mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 23:48: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"
|
"github.com/getsentry/sentry-go"
|
||||||
fsAPI "github.com/matrix-org/dendrite/federationsender/api"
|
fsAPI "github.com/matrix-org/dendrite/federationsender/api"
|
||||||
"github.com/matrix-org/dendrite/internal/eventutil"
|
"github.com/matrix-org/dendrite/internal/eventutil"
|
||||||
|
"github.com/matrix-org/dendrite/roomserver/api"
|
||||||
rsAPI "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/helpers"
|
||||||
"github.com/matrix-org/dendrite/roomserver/internal/input"
|
"github.com/matrix-org/dendrite/roomserver/internal/input"
|
||||||
|
@ -258,10 +259,10 @@ func (r *Joiner) performJoinRoomByID(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !success {
|
if !success {
|
||||||
// We haven't been able to validate the join using any of our own
|
return "", "", &api.PerformError{
|
||||||
// local users, so we now need to depend on a remote server to help.
|
Code: rsAPI.PerformErrorBadRequest,
|
||||||
joinedVia, err = r.performFederatedJoinRoomByID(ctx, req)
|
Msg: fmt.Sprintf("Can't satisfy restricted join to room %q locally", req.RoomIDOrAlias),
|
||||||
return req.RoomIDOrAlias, joinedVia, err
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue