0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-16 15:01:23 +01:00

Update comments

This commit is contained in:
Erik Johnston 2017-10-03 14:10:21 +01:00
parent f2da6df568
commit e4ab96021e
2 changed files with 8 additions and 1 deletions

View file

@ -127,7 +127,7 @@ class FederationHandler(BaseHandler):
# If we're no longer in the room just ditch the event entirely. This # If we're no longer in the room just ditch the event entirely. This
# is probably an old server that has come back and thinks we're still # is probably an old server that has come back and thinks we're still
# in the room. # in the room (or we've been rejoined to the room by a state reset).
# #
# If we were never in the room then maybe our database got vaped and # If we were never in the room then maybe our database got vaped and
# we should check if we *are* in fact in the room. If we are then we # we should check if we *are* in fact in the room. If we are then we

View file

@ -536,6 +536,13 @@ class RoomMemberStore(SQLBaseStore):
@cachedInlineCallbacks() @cachedInlineCallbacks()
def was_host_joined(self, room_id, host): def was_host_joined(self, room_id, host):
"""Check whether the server is or ever was in the room. """Check whether the server is or ever was in the room.
Args:
room_id (str)
host (str)
Returns:
bool: whether the host is/was in the room or not
""" """
if '%' in host or '_' in host: if '%' in host or '_' in host:
raise Exception("Invalid host name") raise Exception("Invalid host name")