Convert rest and handlers to use new event structure

This commit is contained in:
Erik Johnston 2014-12-04 15:50:01 +00:00
parent 5d7c9ab789
commit c31dba86ec
14 changed files with 188 additions and 199 deletions

View file

@ -210,14 +210,11 @@ class ProfileHandler(BaseHandler):
"collect_presencelike_data", user, content
)
new_event = self.event_factory.create_event(
etype=j.type,
room_id=j.room_id,
state_key=j.state_key,
content=content,
user_id=j.state_key,
)
yield self._on_new_room_event(
new_event, snapshot, suppress_auth=True
)
msg_handler = self.hs.get_handlers().message_handler
yield msg_handler.handle_event({
"type": j.type,
"room_id": j.room_id,
"state_key": j.state_key,
"content": content,
"sender": j.state_key,
})