This commit is contained in:
wangchuxiao
2023-05-06 18:51:10 +08:00
parent 287b028ba8
commit 121523626d
8 changed files with 1065 additions and 931 deletions
+14
View File
@@ -238,3 +238,17 @@ func GetNotificationConversationIDBySessionType(sessionType int, ids ...string)
func IsNotification(conversationID string) bool {
return strings.HasPrefix(conversationID, "n_")
}
type MsgBySeq []*sdkws.MsgData
func (s MsgBySeq) Len() int {
return len(s)
}
func (s MsgBySeq) Less(i, j int) bool {
return s[i].Seq < s[j].Seq
}
func (s MsgBySeq) Swap(i, j int) {
s[i], s[j] = s[j], s[i]
}