fix: align group management APIs

This commit is contained in:
richjohnrambo
2026-09-13 16:03:55 +08:00
parent f1279ac607
commit a9afc6ff6a
34 changed files with 1381 additions and 639 deletions
+2 -1
View File
@@ -298,7 +298,6 @@ func replyCreateUser(s *Session, msg *ClientComMessage, rec *auth.Rec) {
}
return
}
dispatchIMBusinessEvents(s.tenantID)
}
if msg.Extra != nil && len(msg.Extra.Attachments) > 0 {
@@ -826,6 +825,7 @@ func changeUserState(s *Session, uid types.Uid, user *types.User, msg *ClientCom
if state != types.StateOK {
// Terminate all sessions.
globals.sessionStore.EvictUser(uid, "")
publishRealtimeEvictUser(s.tenantID, uid, "user_state_changed", "")
}
err = store.Users.UpdateState(s.tenantID, uid, state)
@@ -901,6 +901,7 @@ func replyDelUser(s *Session, msg *ClientComMessage) {
// Terminate all sessions. Skip the current session so the requester gets a response.
globals.sessionStore.EvictUser(uid, s.sid)
publishRealtimeEvictUser(s.tenantID, uid, "user_deleted", s.sid)
// Remove user from cache and announce to cluster that the user is deleted.
usersRemoveUser(msg.TenantID, uid)