fix bug : messages can be sent after the group is disbanded

This commit is contained in:
skiffer-git
2022-09-13 18:15:33 +08:00
parent d487465b2a
commit 0d52759455
3 changed files with 14 additions and 19 deletions
+7
View File
@@ -33,6 +33,13 @@ func GetGroupMemberUserIDList(groupID string, operationID string) ([]string, err
CacheGroupMtx.Lock()
defer CacheGroupMtx.Unlock()
if groupHashRemote == 0 {
log.Info(operationID, "groupHashRemote == 0 ", groupID)
delete(CacheGroupMemberUserIDList, groupID)
return []string{}, nil
}
groupInLocalCache, ok := CacheGroupMemberUserIDList[groupID]
if ok && groupInLocalCache.MemberListHash == groupHashRemote {
log.Debug(operationID, "in local cache ", groupID)