summary refs log tree commit diff
path: root/synapse/handlers/typing.py
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2015-11-05 14:32:26 +0000
committerDaniel Wagner-Hall <daniel@matrix.org>2015-11-05 14:32:26 +0000
commitca2f90742d5606f8fc5b7ddd3dd7244c377c1df8 (patch)
tree3094f16ebc3448ba3379cf209ac8b097a5968ecf /synapse/handlers/typing.py
parentMerge pull request #347 from matrix-org/markjh/check_filter (diff)
downloadsynapse-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/typing.py')
-rw-r--r--synapse/handlers/typing.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py
index d7096aab8c..2846f3e6e8 100644
--- a/synapse/handlers/typing.py
+++ b/synapse/handlers/typing.py
@@ -246,17 +246,12 @@ class TypingNotificationEventSource(object):
             },
         }
 
-    @defer.inlineCallbacks
-    def get_new_events_for_user(self, user, from_key, limit):
+    def get_new_events(self, from_key, room_ids, **kwargs):
         from_key = int(from_key)
         handler = self.handler()
 
-        joined_room_ids = (
-            yield self.room_member_handler().get_joined_rooms_for_user(user)
-        )
-
         events = []
-        for room_id in joined_room_ids:
+        for room_id in room_ids:
             if room_id not in handler._room_serials:
                 continue
             if handler._room_serials[room_id] <= from_key:
@@ -264,7 +259,7 @@ class TypingNotificationEventSource(object):
 
             events.append(self._make_event_for(room_id))
 
-        defer.returnValue((events, handler._latest_room_serial))
+        return events, handler._latest_room_serial
 
     def get_current_key(self):
         return self.handler()._latest_room_serial