mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Error if we can't satisfy locally
This commit is contained in:
parent
ae02c5e6ae
commit
f7c3f75e48
1 changed files with 5 additions and 4 deletions
|
@ -25,6 +25,7 @@ import (
|
|||
"github.com/getsentry/sentry-go"
|
||||
fsAPI "github.com/matrix-org/dendrite/federationsender/api"
|
||||
"github.com/matrix-org/dendrite/internal/eventutil"
|
||||
"github.com/matrix-org/dendrite/roomserver/api"
|
||||
rsAPI "github.com/matrix-org/dendrite/roomserver/api"
|
||||
"github.com/matrix-org/dendrite/roomserver/internal/helpers"
|
||||
"github.com/matrix-org/dendrite/roomserver/internal/input"
|
||||
|
@ -258,10 +259,10 @@ func (r *Joiner) performJoinRoomByID(
|
|||
}
|
||||
}
|
||||
if !success {
|
||||
// We haven't been able to validate the join using any of our own
|
||||
// local users, so we now need to depend on a remote server to help.
|
||||
joinedVia, err = r.performFederatedJoinRoomByID(ctx, req)
|
||||
return req.RoomIDOrAlias, joinedVia, err
|
||||
return "", "", &api.PerformError{
|
||||
Code: rsAPI.PerformErrorBadRequest,
|
||||
Msg: fmt.Sprintf("Can't satisfy restricted join to room %q locally", req.RoomIDOrAlias),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue