summary refs log tree commit diff
path: root/synapse/handlers/events.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-08-28 11:15:27 +0100
committerMark Haines <mark.haines@matrix.org>2015-08-28 11:15:27 +0100
commita7122692d972ce3ac787d4ecf1449f87f33e83cf (patch)
tree81ece372c764d775d1d10cc581100de006456d67 /synapse/handlers/events.py
parentMerge pull request #254 from matrix-org/markjh/tox_setuptools (diff)
parentBump version and changelog (diff)
downloadsynapse-a7122692d972ce3ac787d4ecf1449f87f33e83cf.tar.xz
Merge branch 'release-v0.10.0' into develop
Conflicts:
	synapse/handlers/auth.py
	synapse/python_dependencies.py
	synapse/rest/client/v1/login.py
Diffstat (limited to 'synapse/handlers/events.py')
-rw-r--r--synapse/handlers/events.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py
index f9ca2f8634..891502c04f 100644
--- a/synapse/handlers/events.py
+++ b/synapse/handlers/events.py
@@ -49,7 +49,12 @@ class EventStreamHandler(BaseHandler):
     @defer.inlineCallbacks
     @log_function
     def get_stream(self, auth_user_id, pagin_config, timeout=0,
-                   as_client_event=True, affect_presence=True):
+                   as_client_event=True, affect_presence=True,
+                   only_room_events=False):
+        """Fetches the events stream for a given user.
+
+        If `only_room_events` is `True` only room events will be returned.
+        """
         auth_user = UserID.from_string(auth_user_id)
 
         try:
@@ -89,7 +94,8 @@ class EventStreamHandler(BaseHandler):
                 timeout = random.randint(int(timeout*0.9), int(timeout*1.1))
 
             events, tokens = yield self.notifier.get_events_for(
-                auth_user, room_ids, pagin_config, timeout
+                auth_user, room_ids, pagin_config, timeout,
+                only_room_events=only_room_events
             )
 
             time_now = self.clock.time_msec()