mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 14:12:47 +00:00
Add RoomExists flag to QueryMembershipForUser (#2450)
Fixes https://github.com/matrix-org/complement/pull/369
This commit is contained in:
parent
6db08b2874
commit
c15bfefd0d
6 changed files with 38 additions and 5 deletions
|
@ -73,6 +73,12 @@ func Context(
|
|||
logrus.WithError(err).Error("unable to query membership")
|
||||
return jsonerror.InternalServerError()
|
||||
}
|
||||
if !membershipRes.RoomExists {
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusForbidden,
|
||||
JSON: jsonerror.Forbidden("room does not exist"),
|
||||
}
|
||||
}
|
||||
|
||||
stateFilter := gomatrixserverlib.StateFilter{
|
||||
Limit: 100,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue