diff --git a/config/config.yaml b/config/config.yaml index 1110249e7..2fd18ff0e 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -555,13 +555,14 @@ notification: conversation: reliabilityLevel: 2 unreadCount: true - offlinePush: - switch: true - title: "conversation was set to private " - desc: "conversation was set to private " - ext: "conversation was set to private " - defaultTips: - tips: "conversation was set to private " + 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" diff --git a/internal/rpc/msg/conversation_notification.go b/internal/rpc/msg/conversation_notification.go index ccb5e3674..5c39ea06a 100644 --- a/internal/rpc/msg/conversation_notification.go +++ b/internal/rpc/msg/conversation_notification.go @@ -48,8 +48,19 @@ func ConversationSetPrivateNotification(operationID, sendID, recvID string, isPr IsPrivate: isPrivateChat, } var tips open_im_sdk.TipsComm - strMap := map[bool]string{true: "true", false: "false"} - tips.DefaultTips = config.Config.Notification.ConversationSetPrivate.DefaultTips.Tips + strMap[isPrivateChat] + " by " + sendID + var tipsMsg string + //var senderName string + //senderName, err := im_mysql_model.GetUserNameByUserID(sendID) + //if err != nil { + // log.NewError(operationID, utils.GetSelfFuncName(), err.Error()) + // senderName = sendID + //} + if isPrivateChat == true { + tipsMsg = config.Config.Notification.ConversationSetPrivate.DefaultTips.OpenTips + } else { + tipsMsg = config.Config.Notification.ConversationSetPrivate.DefaultTips.CloseTips + } + tips.DefaultTips = tipsMsg SetConversationNotification(operationID, sendID, recvID, constant.ConversationPrivateChatNotification, conversationSetPrivateTips, tips) }