conversation

This commit is contained in:
wangchuxiao
2023-04-26 14:10:12 +08:00
parent 0dc16d54a5
commit 16231ee077
8 changed files with 261 additions and 65 deletions
+13 -1
View File
@@ -8,6 +8,7 @@ import (
"runtime"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
_ "embed"
@@ -348,10 +349,21 @@ type Notification struct {
BlackDeleted NotificationConf `yaml:"blackDeleted"`
FriendInfoUpdated NotificationConf `yaml:"friendInfoUpdated"`
//////////////////////conversation///////////////////////
ConversationOptUpdate NotificationConf `yaml:"conversationOptUpdate"`
ConversationChanged NotificationConf `yaml:"conversationChanged"`
ConversationSetPrivate NotificationConf `yaml:"conversationSetPrivate"`
}
func GetOptionsByNotification(cfg NotificationConf) utils.Options {
opts := utils.NewOptions()
if cfg.UnreadCount {
opts = utils.WithOptions(opts, utils.WithUnreadCount())
}
if cfg.OfflinePush.Enable {
opts = utils.WithOptions(opts, utils.WithOfflinePush())
}
return opts
}
func (c *config) unmarshalConfig(config interface{}, configPath string) error {
bytes, err := ioutil.ReadFile(configPath)
if err != nil {
+2 -1
View File
@@ -44,7 +44,7 @@ const (
BlackDeletedNotification = 1208 //remove_black
FriendInfoUpdatedNotification = 1209
ConversationOptChangeNotification = 1300 // change conversation opt
ConversationChangeNotification = 1300 // change conversation opt
UserNotificationBegin = 1301
UserInfoUpdatedNotification = 1303 //SetSelfInfoTip = 204
@@ -142,6 +142,7 @@ const (
IsSenderConversationUpdate = "senderConversationUpdate"
IsSenderNotificationPush = "senderNotificationPush"
IsReactionFromCache = "reactionFromCache"
IsNotification = "isNotification"
//GroupStatus
GroupOk = 0