mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +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 {
|
if restricted, roomIDs, rerr := r.checkIfRestrictedJoin(ctx, req); rerr != nil {
|
||||||
return "", "", fmt.Errorf("r.performRestrictedJoinChecks: %w", rerr)
|
return "", "", fmt.Errorf("r.performRestrictedJoinChecks: %w", rerr)
|
||||||
} else if restricted {
|
} else if restricted {
|
||||||
success := false
|
|
||||||
for _, roomID := range roomIDs {
|
for _, roomID := range roomIDs {
|
||||||
if err = r.attemptRestrictedJoinUsingRoomID(ctx, req, roomID, &eb); err != nil {
|
if err = r.attemptRestrictedJoinUsingRoomID(ctx, req, roomID, &eb); err == nil {
|
||||||
continue
|
break
|
||||||
}
|
}
|
||||||
success = true
|
|
||||||
}
|
|
||||||
if !success {
|
|
||||||
return "", "", fmt.Errorf("restricted join failed")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue