Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Persist rejection of invites over federation #646

Merged
merged 2 commits into from
Mar 15, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion synapse/handlers/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,23 @@ def do_remotely_reject_invite(self, target_hosts, room_id, user_id):
target_hosts,
signed_event
)
defer.returnValue(None)

context = yield self.state_handler.compute_event_context(event)

event_stream_id, max_stream_id = yield self.store.persist_event(
event,
context=context,
backfilled=False,
)

target_user = UserID.from_string(event.state_key)
with PreserveLoggingContext():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that the notifier preserved the logging context.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, I c+p'd from above. /me looks

self.notifier.on_new_room_event(
event, event_stream_id, max_stream_id,
extra_users=[target_user],
)

defer.returnValue(event)

@defer.inlineCallbacks
def _make_and_verify_event(self, target_hosts, room_id, user_id, membership,
Expand Down