summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-10-03 14:10:21 +0100
committerErik Johnston <erik@matrix.org>2017-10-03 14:10:41 +0100
commite4ab96021e84ad9cccb2c3e0dea6347cce4e6149 (patch)
treeb3dfcbd38cb486c9854aba9153840d1ae3420cbb
parentRemove spurious line feed (diff)
downloadsynapse-e4ab96021e84ad9cccb2c3e0dea6347cce4e6149.tar.xz
Update comments
-rw-r--r--synapse/handlers/federation.py2
-rw-r--r--synapse/storage/roommember.py7
2 files changed, 8 insertions, 1 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 7456b23005..77dd0ae1e2 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -127,7 +127,7 @@ class FederationHandler(BaseHandler):
 
         # 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
-        # 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
         # we should check if we *are* in fact in the room. If we are then we
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index cb0791e591..63f6115ba9 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -536,6 +536,13 @@ class RoomMemberStore(SQLBaseStore):
     @cachedInlineCallbacks()
     def was_host_joined(self, room_id, host):
         """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:
             raise Exception("Invalid host name")