diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-11-12 17:04:03 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-11-13 16:23:00 +0000 |
commit | fa7f378bba04ae4e49c1ae906b8151c336c1b2ea (patch) | |
tree | 2cb2b7adc3fae51a3dcf9ce7702578cd272f0a82 /synapse/handlers | |
parent | Extend sync to inform clients about the progress of their knocks (diff) | |
download | synapse-fa7f378bba04ae4e49c1ae906b8151c336c1b2ea.tar.xz |
Auto-add displaynames to knock events if they're missing
Tiny commit to just bring knocking up to feature parity.
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/message.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 94bdc15dcf..1d8eaa6212 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # Copyright 2017-2018 New Vector Ltd -# Copyright 2019 The Matrix.org Foundation C.I.C. +# Copyright 2019-2020 The Matrix.org Foundation C.I.C. +# Copyrignt 2020 Sorunome # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -914,8 +915,8 @@ class EventCreationHandler: room_version = await self.store.get_room_version_id(event.room_id) if event.internal_metadata.is_out_of_band_membership(): - # the only sort of out-of-band-membership events we expect to see here - # are invite rejections we have generated ourselves. + # the only sort of out-of-band-membership events we expect to see here are + # invite rejections and rescinded knocks that we have generated ourselves. assert event.type == EventTypes.Member assert event.content["membership"] == Membership.LEAVE else: @@ -1138,9 +1139,6 @@ class EventCreationHandler: if original_event.room_id != event.room_id: raise SynapseError(400, "Cannot redact event from a different room") - if original_event.type == EventTypes.ServerACL: - raise AuthError(403, "Redacting server ACL events is not permitted") - prev_state_ids = await context.get_prev_state_ids() auth_events_ids = self.auth.compute_auth_events( event, prev_state_ids, for_verification=True |