fix(server): 修复群组权限缓存与解散群问题

1. 新增group事件处理逻辑,实时刷新内存中的群组权限与状态
2. 加载topic时过滤已解散的群组,防止被旧成员恢复
3. 补充群成员离开事件的用户ID字段,完善事件处理
This commit is contained in:
Austin
2026-09-15 15:18:14 +08:00
parent 5dd0a42002
commit 55afd976c9
4 changed files with 217 additions and 0 deletions
+6
View File
@@ -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
}