diff options
author | Steven Hammerton <steven.hammerton@openmarket.com> | 2015-11-05 20:59:45 +0000 |
---|---|---|
committer | Steven Hammerton <steven.hammerton@openmarket.com> | 2015-11-05 20:59:45 +0000 |
commit | fece2f5c771ca4baab8a0541ede8af2e33ff1b41 (patch) | |
tree | 22973a8a9a9b806cb09d734e19cb5150686e9869 /synapse/handlers/events.py | |
parent | Allow hs to do CAS login completely and issue the client with a login token t... (diff) | |
parent | Merge pull request #350 from matrix-org/erikj/search (diff) | |
download | synapse-fece2f5c771ca4baab8a0541ede8af2e33ff1b41.tar.xz |
Merge branch 'develop' into sh-cas-auth-via-homeserver
Diffstat (limited to 'synapse/handlers/events.py')
-rw-r--r-- | synapse/handlers/events.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py index 53c8ca3a26..0e4c0d4d06 100644 --- a/synapse/handlers/events.py +++ b/synapse/handlers/events.py @@ -100,7 +100,7 @@ class EventStreamHandler(BaseHandler): @log_function def get_stream(self, auth_user_id, pagin_config, timeout=0, as_client_event=True, affect_presence=True, - only_room_events=False): + only_room_events=False, room_id=None, is_guest=False): """Fetches the events stream for a given user. If `only_room_events` is `True` only room events will be returned. @@ -119,9 +119,15 @@ class EventStreamHandler(BaseHandler): # thundering herds on restart. timeout = random.randint(int(timeout*0.9), int(timeout*1.1)) + if is_guest: + yield self.distributor.fire( + "user_joined_room", user=auth_user, room_id=room_id + ) + events, tokens = yield self.notifier.get_events_for( auth_user, pagin_config, timeout, - only_room_events=only_room_events + only_room_events=only_room_events, + is_guest=is_guest, guest_room_id=room_id ) time_now = self.clock.time_msec() |