Merge branch 'superGroup' of github.com:OpenIMSDK/Open-IM-Server into superGroup

This commit is contained in:
wangchuxiao
2022-05-30 11:55:45 +08:00
14 changed files with 796 additions and 782 deletions
+3 -3
View File
@@ -105,9 +105,9 @@ const (
SysMsgType = 200
//SessionType
SingleChatType = 1
GroupChatType = 2
SingleChatType = 1
GroupChatType = 2
SuperGroupChatType = 3
NotificationChatType = 4
//token
NormalToken = 0
+7
View File
@@ -1032,6 +1032,10 @@ func getSeqUid(uid string, seq uint32) string {
seqSuffix := seq / singleGocMsgNum
return indexGen(uid, seqSuffix)
}
func getSeqSuperGroupID(groupID string, seq uint32) string {
seqSuffix := seq / singleGocMsgNum
return superGroupIndexGen(groupID, seqSuffix)
}
func GetSeqUid(uid string, seq uint32) string {
return getSeqUid(uid, seq)
@@ -1069,3 +1073,6 @@ func isNotContainInt32(target uint32, List []uint32) bool {
func indexGen(uid string, seqSuffix uint32) string {
return uid + ":" + strconv.FormatInt(int64(seqSuffix), 10)
}
func superGroupIndexGen(groupID string, seqSuffix uint32) string {
return "super_group_" + groupID + ":" + strconv.FormatInt(int64(seqSuffix), 10)
}