summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-12 10:55:11 +0000
committerErik Johnston <erik@matrix.org>2016-01-12 11:04:06 +0000
commitfd5c28dc52f591734b5f3eb465b283761e1116f3 (patch)
treef3479343113c77e0b126f047be80e861b948742d
parentMerge pull request #478 from matrix-org/daniel/userobject (diff)
downloadsynapse-fd5c28dc52f591734b5f3eb465b283761e1116f3.tar.xz
Dont fire user_joined_room when guest hits /events
Firing the 'user_joined_room' signal everytime a guest hits /events
causes all presence for that room to be returned in the stream. This may
sound helpful, but causes clients to tightloop calling /events.

In general, guest users should get the initial presence from (room)
intial sync and so we don't require presence to sbsequently come down
the event stream.
Diffstat (limited to '')
-rw-r--r--synapse/handlers/events.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py
index 28c674730e..c73eec2b91 100644
--- a/synapse/handlers/events.py
+++ b/synapse/handlers/events.py
@@ -36,10 +36,6 @@ def stopped_user_eventstream(distributor, user):
     return distributor.fire("stopped_user_eventstream", user)
 
 
-def user_joined_room(distributor, user, room_id):
-    return distributor.fire("user_joined_room", user, room_id)
-
-
 class EventStreamHandler(BaseHandler):
 
     def __init__(self, hs):
@@ -136,9 +132,6 @@ class EventStreamHandler(BaseHandler):
                 # thundering herds on restart.
                 timeout = random.randint(int(timeout*0.9), int(timeout*1.1))
 
-            if is_guest:
-                yield user_joined_room(self.distributor, auth_user, room_id)
-
             events, tokens = yield self.notifier.get_events_for(
                 auth_user, pagin_config, timeout,
                 only_room_events=only_room_events,