diff options
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/presence.py | 5 | ||||
-rw-r--r-- | synapse/handlers/room.py | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index 179b431aa5..1808e00ae8 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -651,11 +651,16 @@ class PresenceHandler(BaseHandler): logger.debug("Incoming presence update from %s", user) observers = set(self._remote_recvmap.get(user, set())) + if observers: + logger.debug(" | %d interested local observers %r", len(observers), observers) rm_handler = self.homeserver.get_handlers().room_member_handler room_ids = yield rm_handler.get_rooms_for_user(user) + if room_ids: + logger.debug(" | %d interested room IDs %r", len(room_ids), room_ids) if not observers and not room_ids: + logger.debug(" | no interested observers or room IDs") continue state = dict(push) diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 315fb02e7b..6e1c37df03 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -522,7 +522,11 @@ class RoomMemberHandler(BaseHandler): user_id=user.to_string(), membership_list=membership_list ) - defer.returnValue([r.room_id for r in rooms]) + # For some reason the list of events contains duplicates + # TODO(paul): work out why because I really don't think it should + room_ids = set(r.room_id for r in rooms) + + defer.returnValue(room_ids) @defer.inlineCallbacks def _do_local_membership_update(self, event, membership, snapshot, |