diff options
Diffstat (limited to 'federationapi/routing/join.go')
-rw-r--r-- | federationapi/routing/join.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/federationapi/routing/join.go b/federationapi/routing/join.go index b48eaf78..1a121987 100644 --- a/federationapi/routing/join.go +++ b/federationapi/routing/join.go @@ -329,6 +329,12 @@ func SendJoin( JSON: jsonerror.NotFound("Room does not exist"), } } + if !stateAndAuthChainResponse.StateKnown { + return util.JSONResponse{ + Code: http.StatusForbidden, + JSON: jsonerror.Forbidden("State not known"), + } + } // Check if the user is already in the room. If they're already in then // there isn't much point in sending another join event into the room. |