|
|
|
@ -176,22 +176,22 @@ func GetConversationIDByMsg(msg *sdkws.MsgData) string {
|
|
|
|
|
case constant.SingleChatType:
|
|
|
|
|
l := []string{msg.SendID, msg.RecvID}
|
|
|
|
|
sort.Strings(l)
|
|
|
|
|
if options.IsNotification() {
|
|
|
|
|
if !options.IsNotNotification() {
|
|
|
|
|
return "n_" + strings.Join(l, "_")
|
|
|
|
|
}
|
|
|
|
|
return "si_" + strings.Join(l, "_") // single chat
|
|
|
|
|
case constant.GroupChatType:
|
|
|
|
|
if options.IsNotification() {
|
|
|
|
|
if !options.IsNotNotification() {
|
|
|
|
|
return "n_" + msg.GroupID // group chat
|
|
|
|
|
}
|
|
|
|
|
return "g_" + msg.GroupID // group chat
|
|
|
|
|
case constant.SuperGroupChatType:
|
|
|
|
|
if options.IsNotification() {
|
|
|
|
|
if !options.IsNotNotification() {
|
|
|
|
|
return "n_" + msg.GroupID // super group chat
|
|
|
|
|
}
|
|
|
|
|
return "sg_" + msg.GroupID // super group chat
|
|
|
|
|
case constant.NotificationChatType:
|
|
|
|
|
if options.IsNotification() {
|
|
|
|
|
if !options.IsNotNotification() {
|
|
|
|
|
return "n_" + msg.SendID + "_" + msg.RecvID // super group chat
|
|
|
|
|
}
|
|
|
|
|
return "sn_" + msg.SendID + "_" + msg.RecvID // server notification chat
|
|
|
|
|