Merge branch 'develop' into pushers

Conflicts:
	synapse/handlers/events.py
	synapse/server.py
This commit is contained in:
David Baker 2015-01-28 12:51:05 +00:00
commit c291a4d522
51 changed files with 527 additions and 299 deletions

View file

@ -17,6 +17,8 @@ from twisted.internet import defer
from synapse.util.logcontext import PreserveLoggingContext
from synapse.util.logutils import log_function
from synapse.types import UserID
from synapse.events.utils import serialize_event
from ._base import BaseHandler
@ -48,7 +50,7 @@ class EventStreamHandler(BaseHandler):
@log_function
def get_stream(self, auth_user_id, pagin_config, timeout=0,
as_client_event=True, affect_presence=True):
auth_user = self.hs.parse_userid(auth_user_id)
auth_user = UserID.from_string(auth_user_id)
try:
if affect_presence:
@ -78,8 +80,10 @@ class EventStreamHandler(BaseHandler):
auth_user, room_ids, pagin_config, timeout
)
time_now = self.clock.time_msec()
chunks = [
self.hs.serialize_event(e, as_client_event) for e in events
serialize_event(e, time_now, as_client_event) for e in events
]
chunk = {