mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-15 13:42:26 +03:00
Cleanup remaining statekey usage for senderIDs (#3106)
This commit is contained in:
parent
832ccc32f6
commit
77d9e4e93d
62 changed files with 760 additions and 455 deletions
|
@ -149,11 +149,11 @@ func (r *Admin) PerformAdminEvacuateUser(
|
|||
ctx context.Context,
|
||||
userID string,
|
||||
) (affected []string, err error) {
|
||||
_, domain, err := gomatrixserverlib.SplitID('@', userID)
|
||||
fullUserID, err := spec.NewUserID(userID, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !r.Cfg.Matrix.IsLocalServerName(domain) {
|
||||
if !r.Cfg.Matrix.IsLocalServerName(fullUserID.Domain()) {
|
||||
return nil, fmt.Errorf("can only evacuate local users using this endpoint")
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ func (r *Admin) PerformAdminEvacuateUser(
|
|||
for _, roomID := range allRooms {
|
||||
leaveReq := &api.PerformLeaveRequest{
|
||||
RoomID: roomID,
|
||||
UserID: userID,
|
||||
Leaver: *fullUserID,
|
||||
}
|
||||
leaveRes := &api.PerformLeaveResponse{}
|
||||
outputEvents, err := r.Leaver.PerformLeave(ctx, leaveReq, leaveRes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue