mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-11-26 08:11:55 -06:00
Return forbidden if not a member anymore (fix #2802)
This commit is contained in:
parent
db6a214b04
commit
64fc3b8ef2
|
@ -109,6 +109,12 @@ func GetMemberships(
|
||||||
}
|
}
|
||||||
|
|
||||||
if joinedOnly {
|
if joinedOnly {
|
||||||
|
if !queryRes.IsInRoom {
|
||||||
|
return util.JSONResponse{
|
||||||
|
Code: http.StatusForbidden,
|
||||||
|
JSON: jsonerror.Forbidden("You aren't a member of the room and weren't previously a member of the room."),
|
||||||
|
}
|
||||||
|
}
|
||||||
var res getJoinedMembersResponse
|
var res getJoinedMembersResponse
|
||||||
res.Joined = make(map[string]joinedMember)
|
res.Joined = make(map[string]joinedMember)
|
||||||
for _, ev := range result {
|
for _, ev := range result {
|
||||||
|
|
Loading…
Reference in a new issue