diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-01-03 16:09:24 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-01-06 13:45:33 +0000 |
commit | 15720092ac7a1af57dde7018a8872d93bbb9d36b (patch) | |
tree | 3069d06c4991adec312310a5153ff837a1d5b457 /synapse/handlers | |
parent | rename get_prev_events_for_room to get_prev_events_and_hashes_for_room (diff) | |
download | synapse-15720092ac7a1af57dde7018a8872d93bbb9d36b.tar.xz |
replace get_prev_events_and_hashes_for_room with get_prev_events_for_room in create_new_client_event
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/message.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 2695975a16..a1c289b24a 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -739,17 +739,11 @@ class EventCreationHandler(object): "Attempting to create an event with %i prev_events" % (len(prev_events_and_hashes),) ) + prev_event_ids = [event_id for event_id, _, _ in prev_events_and_hashes] else: - prev_events_and_hashes = yield self.store.get_prev_events_and_hashes_for_room( - builder.room_id - ) - - prev_events = [ - (event_id, prev_hashes) - for event_id, prev_hashes, _ in prev_events_and_hashes - ] + prev_event_ids = yield self.store.get_prev_events_for_room(builder.room_id) - event = yield builder.build(prev_event_ids=[p for p, _ in prev_events]) + event = yield builder.build(prev_event_ids=prev_event_ids) context = yield self.state.compute_event_context(event) if requester: context.app_service = requester.app_service |