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

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
  • Loading branch information
sandhose and clokep committed Mar 6, 2023
1 parent 431d037 commit 1700db3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/events/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,9 @@ def serialize_event(
# There is a special case for guests, because they only have one access token
# without associated access_token_id, so we always include the txn_id for events
# they sent.
txn_id = getattr(e.internal_metadata, "txn_id", None)
txn_id = e.internal_metadata.txn_id
if txn_id is not None and config.requester is not None:
event_token_id = getattr(e.internal_metadata, "token_id", None)
event_token_id = e.internal_metadata.token_id
if config.requester.user.to_string() == e.sender and (
(
event_token_id is not None
Expand Down

0 comments on commit 1700db3

Please sign in to comment.