tag and set private tips

pull/218/head
wangchuxiao 3 years ago
parent 0e27b302bc
commit a16a75230c

@ -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"

@ -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)
}

Loading…
Cancel
Save