fix: align group management APIs
This commit is contained in:
+2
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user