diff options
author | Erik Johnston <erik@matrix.org> | 2014-12-04 15:50:01 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-12-04 15:50:01 +0000 |
commit | c31dba86ec40853f27c70ae13409ca3332052cc1 (patch) | |
tree | ab5a11519590c3c8e2211aedd2b441a7ccc759d5 /synapse/handlers/federation.py | |
parent | Begin converting things to use the new Event structure (diff) | |
download | synapse-c31dba86ec40853f27c70ae13409ca3332052cc1.tar.xz |
Convert rest and handlers to use new event structure
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 7bd36e415e..b4a28ea3cb 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -421,16 +421,17 @@ class FederationHandler(BaseHandler): join event for the room and return that. We don *not* persist or process it until the other server has signed it and sent it back. """ - event = self.event_factory.create_event( - etype=RoomMemberEvent.TYPE, - content={"membership": Membership.JOIN}, - room_id=context, - user_id=user_id, - state_key=user_id, - ) + builder = self.event_builder_factory.new({ + "type": RoomMemberEvent.TYPE, + "content": {"membership": Membership.JOIN}, + "room_id": context, + "sender": user_id, + "state_key": user_id, + }) - snapshot = yield self.store.snapshot_room(event) - snapshot.fill_out_prev_events(event) + event, context = yield self._create_new_client_event( + builder=builder, + ) yield self.state_handler.annotate_event_with_state(event) yield self.auth.add_auth_events(event) |