diff --git a/config/config.yaml b/config/config.yaml index 598f8bfc2..45be10f1a 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -600,7 +600,7 @@ notification: conversationSetPrivate: conversation: - reliabilityLevel: 2 + reliabilityLevel: 3 unreadCount: true offlinePush: switch: true @@ -611,6 +611,19 @@ notification: openTips: "burn after reading was opened" closeTips: "burn after reading was closed" + ###################workMoments################ + workMomentsNotification: + conversation: + reliabilityLevel: 2 + unreadCount: true + offlinePush: + switch: true + title: "burn after reading" + desc: "burn after reading" + ext: "burn after reading" + defaultTips: + openTips: "burn after reading was opened" + closeTips: "burn after reading was closed" #---------------demo configuration---------------------# diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index 45f3ce70d..141c072ec 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -594,6 +594,21 @@ func Notification(n *NotificationMsg) { reliabilityLevel = config.Config.Notification.OrganizationChanged.Conversation.ReliabilityLevel unReadCount = config.Config.Notification.OrganizationChanged.Conversation.UnreadCount + case constant.WorkMomentNotification: + pushSwitch = config.Config.Notification.WorkMomentsNotification.OfflinePush.PushSwitch + title = config.Config.Notification.WorkMomentsNotification.OfflinePush.Title + desc = config.Config.Notification.WorkMomentsNotification.OfflinePush.Desc + ex = config.Config.Notification.WorkMomentsNotification.OfflinePush.Ext + reliabilityLevel = config.Config.Notification.WorkMomentsNotification.Conversation.ReliabilityLevel + unReadCount = config.Config.Notification.WorkMomentsNotification.Conversation.UnreadCount + + case constant.ConversationPrivateChatNotification: + pushSwitch = config.Config.Notification.ConversationSetPrivate.OfflinePush.PushSwitch + title = config.Config.Notification.ConversationSetPrivate.OfflinePush.Title + desc = config.Config.Notification.ConversationSetPrivate.OfflinePush.Desc + ex = config.Config.Notification.ConversationSetPrivate.OfflinePush.Ext + reliabilityLevel = config.Config.Notification.ConversationSetPrivate.Conversation.ReliabilityLevel + unReadCount = config.Config.Notification.ConversationSetPrivate.Conversation.UnreadCount } switch reliabilityLevel { case constant.UnreliableNotification: diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 926ada32e..aed2c1173 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -382,6 +382,11 @@ type config struct { CloseTips string `yaml:"closeTips"` } `yaml:"defaultTips"` } `yaml:"conversationSetPrivate"` + WorkMomentsNotification struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } `yaml:"workMomentsNotification"` } Demo struct { Port []int `yaml:"openImDemoPort"`