mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-26 15:08:28 +00:00
Don't fail hard, let roomserver reject event if it fails auth
This commit is contained in:
parent
498fbc277b
commit
b1c024c9c1
1 changed files with 2 additions and 7 deletions
|
@ -246,15 +246,10 @@ func (r *Joiner) performJoinRoomByID(
|
|||
if restricted, roomIDs, rerr := r.checkIfRestrictedJoin(ctx, req); rerr != nil {
|
||||
return "", "", fmt.Errorf("r.performRestrictedJoinChecks: %w", rerr)
|
||||
} else if restricted {
|
||||
success := false
|
||||
for _, roomID := range roomIDs {
|
||||
if err = r.attemptRestrictedJoinUsingRoomID(ctx, req, roomID, &eb); err != nil {
|
||||
continue
|
||||
if err = r.attemptRestrictedJoinUsingRoomID(ctx, req, roomID, &eb); err == nil {
|
||||
break
|
||||
}
|
||||
success = true
|
||||
}
|
||||
if !success {
|
||||
return "", "", fmt.Errorf("restricted join failed")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue