mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-06 10:05:58 +08:00
add super group
This commit is contained in:
@@ -105,9 +105,9 @@ const (
|
||||
SysMsgType = 200
|
||||
|
||||
//SessionType
|
||||
SingleChatType = 1
|
||||
GroupChatType = 2
|
||||
|
||||
SingleChatType = 1
|
||||
GroupChatType = 2
|
||||
SuperGroupChatType = 3
|
||||
NotificationChatType = 4
|
||||
//token
|
||||
NormalToken = 0
|
||||
|
||||
@@ -949,6 +949,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)
|
||||
@@ -986,3 +990,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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user