diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-10-04 11:16:19 +0100 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-10-04 12:10:20 +0100 |
commit | eaec1d4ce71a8bc1b327bb4e05163674476406c7 (patch) | |
tree | 0d4bffd51a8469d7280c66e9f4f9270cf54cfd88 /synapse/handlers/federation.py | |
parent | Lint (again) (diff) | |
download | synapse-eaec1d4ce71a8bc1b327bb4e05163674476406c7.tar.xz |
Incorporate review
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 403bebbf59..c5dc3f2a27 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -2700,20 +2700,14 @@ class FederationHandler(BaseHandler): ) if original_invite: # If the m.room.third_party_invite event's content is empty, it means the - # invite has been revoked. - if original_invite.content: - display_name = original_invite.content["display_name"] - event_dict["content"]["third_party_invite"][ - "display_name" - ] = display_name - else: - # Don't discard or raise an error here because that's not the right place - # to do auth checks. The auth check will fail on this invite because we - # won't be able to fetch public keys from the m.room.third_party_invite - # event's content (because it's empty). - logger.info( - "Found invite event for third_party_invite but it has been revoked" - ) + # invite has been revoked. In this case, we don't have to raise an error here + # because the auth check will fail on the invite (because it's not able to + # fetch public keys from the m.room.third_party_invite event's content, which + # is empty. + display_name = original_invite.content.get("display_name") + event_dict["content"]["third_party_invite"][ + "display_name" + ] = display_name else: logger.info( "Could not find invite event for third_party_invite: %r", |