mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Merge remote-tracking branch 'origin/tuoyun' into tuoyun
This commit is contained in:
commit
db116f39fd
@ -71,6 +71,10 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
|
|||||||
bCustomContent, _ := json.Marshal(customContent)
|
bCustomContent, _ := json.Marshal(customContent)
|
||||||
jsonCustomContent := string(bCustomContent)
|
jsonCustomContent := string(bCustomContent)
|
||||||
var content string
|
var content string
|
||||||
|
if pushMsg.MsgData.OfflinePushInfo != nil {
|
||||||
|
content = pushMsg.MsgData.OfflinePushInfo.Title
|
||||||
|
|
||||||
|
} else {
|
||||||
switch pushMsg.MsgData.ContentType {
|
switch pushMsg.MsgData.ContentType {
|
||||||
case constant.Text:
|
case constant.Text:
|
||||||
content = constant.ContentType2PushContent[constant.Text]
|
content = constant.ContentType2PushContent[constant.Text]
|
||||||
@ -93,10 +97,8 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
|
|||||||
default:
|
default:
|
||||||
content = constant.ContentType2PushContent[constant.Common]
|
content = constant.ContentType2PushContent[constant.Common]
|
||||||
}
|
}
|
||||||
if pushMsg.MsgData.OfflinePushInfo != nil {
|
|
||||||
content = pushMsg.MsgData.OfflinePushInfo.Title
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pushResult, err := push.JGAccountListPush(UIDList, content, jsonCustomContent, constant.PlatformIDToName(t))
|
pushResult, err := push.JGAccountListPush(UIDList, content, jsonCustomContent, constant.PlatformIDToName(t))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.NewError(pushMsg.OperationID, "offline push error", pushMsg.String(), err.Error(), constant.PlatformIDToName(t))
|
log.NewError(pushMsg.OperationID, "offline push error", pushMsg.String(), err.Error(), constant.PlatformIDToName(t))
|
||||||
|
@ -187,7 +187,7 @@ type ChatLog struct {
|
|||||||
SessionType int32 `gorm:"column:session_type" json:"sessionType"`
|
SessionType int32 `gorm:"column:session_type" json:"sessionType"`
|
||||||
MsgFrom int32 `gorm:"column:msg_from" json:"msgFrom"`
|
MsgFrom int32 `gorm:"column:msg_from" json:"msgFrom"`
|
||||||
ContentType int32 `gorm:"column:content_type" json:"contentType"`
|
ContentType int32 `gorm:"column:content_type" json:"contentType"`
|
||||||
Content string `gorm:"column:content;type:varchar(1000)" json:"content"`
|
Content string `gorm:"column:content;type:varchar(3000)" json:"content"`
|
||||||
Status int32 `gorm:"column:status" json:"status"`
|
Status int32 `gorm:"column:status" json:"status"`
|
||||||
SendTime time.Time `gorm:"column:send_time" json:"sendTime"`
|
SendTime time.Time `gorm:"column:send_time" json:"sendTime"`
|
||||||
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
|
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user