mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-04 09:05:59 +08:00
Merge remote-tracking branch 'origin/tuoyun' into tuoyun
This commit is contained in:
@@ -232,14 +232,14 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i
|
||||
type NotificationMsg struct {
|
||||
SendID string
|
||||
RecvID string
|
||||
Content []byte
|
||||
Content []byte // open_im_sdk.TipsComm
|
||||
MsgFrom int32
|
||||
ContentType int32
|
||||
SessionType int32
|
||||
OperationID string
|
||||
}
|
||||
|
||||
func Notification(n *NotificationMsg, onlineUserOnly bool) {
|
||||
func Notification(n *NotificationMsg) {
|
||||
var req pbChat.SendMsgReq
|
||||
var msg sdk_ws.MsgData
|
||||
var offlineInfo sdk_ws.OfflinePushInfo
|
||||
@@ -259,7 +259,7 @@ func Notification(n *NotificationMsg, onlineUserOnly bool) {
|
||||
msg.RecvID = ""
|
||||
msg.GroupID = n.RecvID
|
||||
}
|
||||
if onlineUserOnly {
|
||||
if true {
|
||||
msg.Options = make(map[string]bool, 10)
|
||||
//utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, false)
|
||||
utils.SetSwitchFromOptions(msg.Options, constant.IsHistory, false)
|
||||
@@ -267,23 +267,23 @@ func Notification(n *NotificationMsg, onlineUserOnly bool) {
|
||||
}
|
||||
offlineInfo.IOSBadgeCount = config.Config.IOSPush.BadgeCount
|
||||
offlineInfo.IOSPushSound = config.Config.IOSPush.PushSound
|
||||
switch msg.ContentType {
|
||||
case constant.GroupCreatedNotification:
|
||||
pushSwitch = config.Config.Notification.GroupCreated.OfflinePush.PushSwitch
|
||||
title = config.Config.Notification.GroupCreated.OfflinePush.Title
|
||||
desc = config.Config.Notification.GroupCreated.OfflinePush.Desc
|
||||
ex = config.Config.Notification.GroupCreated.OfflinePush.Ext
|
||||
case constant.GroupInfoChangedNotification:
|
||||
pushSwitch = config.Config.Notification.GroupInfoChanged.OfflinePush.PushSwitch
|
||||
title = config.Config.Notification.GroupInfoChanged.OfflinePush.Title
|
||||
desc = config.Config.Notification.GroupInfoChanged.OfflinePush.Desc
|
||||
ex = config.Config.Notification.GroupInfoChanged.OfflinePush.Ext
|
||||
case constant.JoinApplicationNotification:
|
||||
pushSwitch = config.Config.Notification.ApplyJoinGroup.OfflinePush.PushSwitch
|
||||
title = config.Config.Notification.ApplyJoinGroup.OfflinePush.Title
|
||||
desc = config.Config.Notification.ApplyJoinGroup.OfflinePush.Desc
|
||||
ex = config.Config.Notification.ApplyJoinGroup.OfflinePush.Ext
|
||||
}
|
||||
//switch msg.ContentType {
|
||||
//case constant.GroupCreatedNotification:
|
||||
// pushSwitch = config.Config.Notification.GroupCreated.OfflinePush.PushSwitch
|
||||
// title = config.Config.Notification.GroupCreated.OfflinePush.Title
|
||||
// desc = config.Config.Notification.GroupCreated.OfflinePush.Desc
|
||||
// ex = config.Config.Notification.GroupCreated.OfflinePush.Ext
|
||||
//case constant.GroupInfoChangedNotification:
|
||||
// pushSwitch = config.Config.Notification.GroupInfoChanged.OfflinePush.PushSwitch
|
||||
// title = config.Config.Notification.GroupInfoChanged.OfflinePush.Title
|
||||
// desc = config.Config.Notification.GroupInfoChanged.OfflinePush.Desc
|
||||
// ex = config.Config.Notification.GroupInfoChanged.OfflinePush.Ext
|
||||
//case constant.JoinApplicationNotification:
|
||||
// pushSwitch = config.Config.Notification.ApplyJoinGroup.OfflinePush.PushSwitch
|
||||
// title = config.Config.Notification.ApplyJoinGroup.OfflinePush.Title
|
||||
// desc = config.Config.Notification.ApplyJoinGroup.OfflinePush.Desc
|
||||
// ex = config.Config.Notification.ApplyJoinGroup.OfflinePush.Ext
|
||||
//}
|
||||
utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, pushSwitch)
|
||||
offlineInfo.Title = title
|
||||
offlineInfo.Desc = desc
|
||||
|
||||
Reference in New Issue
Block a user