fix(server): 修复群组权限缓存与解散群问题
1. 新增group事件处理逻辑,实时刷新内存中的群组权限与状态 2. 加载topic时过滤已解散的群组,防止被旧成员恢复 3. 补充群成员离开事件的用户ID字段,完善事件处理
This commit is contained in:
@@ -639,6 +639,12 @@ func initTopicGrp(t *Topic) error {
|
||||
return types.ErrTopicNotFound
|
||||
}
|
||||
|
||||
// A dissolved group must not be loaded or re-subscribed to. Otherwise the
|
||||
// group could be restored by any former member.
|
||||
if stopic.State == types.StateDeleted {
|
||||
return types.ErrTopicNotFound
|
||||
}
|
||||
|
||||
if err = t.loadSubscribers(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user