diff options
author | Daniel Wagner-Hall <daniel@matrix.org> | 2015-11-05 14:32:26 +0000 |
---|---|---|
committer | Daniel Wagner-Hall <daniel@matrix.org> | 2015-11-05 14:32:26 +0000 |
commit | ca2f90742d5606f8fc5b7ddd3dd7244c377c1df8 (patch) | |
tree | 3094f16ebc3448ba3379cf209ac8b097a5968ecf /synapse/handlers/presence.py | |
parent | Merge pull request #347 from matrix-org/markjh/check_filter (diff) | |
download | synapse-ca2f90742d5606f8fc5b7ddd3dd7244c377c1df8.tar.xz |
Open up /events to anonymous users for room events only
Squash-merge of PR #345 from daniel/anonymousevents
Diffstat (limited to 'synapse/handlers/presence.py')
-rw-r--r-- | synapse/handlers/presence.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index ce60642127..0b780cd528 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -1142,8 +1142,9 @@ class PresenceEventSource(object): @defer.inlineCallbacks @log_function - def get_new_events_for_user(self, user, from_key, limit): + def get_new_events(self, user, from_key, room_ids=None, **kwargs): from_key = int(from_key) + room_ids = room_ids or [] presence = self.hs.get_handlers().presence_handler cachemap = presence._user_cachemap @@ -1161,7 +1162,6 @@ class PresenceEventSource(object): user_ids_to_check |= set( UserID.from_string(p["observed_user_id"]) for p in presence_list ) - room_ids = yield presence.get_joined_rooms_for_user(user) for room_id in set(room_ids) & set(presence._room_serials): if presence._room_serials[room_id] > from_key: joined = yield presence.get_joined_users_for_room_id(room_id) |