custom error code for not leaving server notices room

This commit is contained in:
Richard van der Hoff 2018-05-22 17:27:03 +01:00
parent 0a078026ea
commit 08bfc48abf
2 changed files with 2 additions and 0 deletions

View file

@ -306,6 +306,7 @@ class RoomMemberHandler(object):
raise SynapseError(
http_client.FORBIDDEN,
"You cannot leave this room",
errcode=Codes.CANNOT_LEAVE_SERVER_NOTICE_ROOM,
)
if effective_membership_state == Membership.INVITE: