diff options
author | David Teller <D.O.Teller@gmail.com> | 2022-07-11 18:52:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-11 16:52:10 +0000 |
commit | 11f811470ff94dedc4232072b7f9ff099d4fcbd6 (patch) | |
tree | 982ec784ffb679557df2949e0b0060b096fd562c /synapse/rest/media/v1 | |
parent | Fix to-device messages not being sent to MSC3202-enabled appservices (#13235) (diff) | |
download | synapse-11f811470ff94dedc4232072b7f9ff099d4fcbd6.tar.xz |
Uniformize spam-checker API, part 5: expand other spam-checker callbacks to return `Tuple[Codes, dict]` (#13044)
Signed-off-by: David Teller <davidt@element.io> Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
Diffstat (limited to 'synapse/rest/media/v1')
-rw-r--r-- | synapse/rest/media/v1/media_storage.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/media_storage.py b/synapse/rest/media/v1/media_storage.py index 9137417342..a5c3de192f 100644 --- a/synapse/rest/media/v1/media_storage.py +++ b/synapse/rest/media/v1/media_storage.py @@ -154,7 +154,9 @@ class MediaStorage: # Note that we'll delete the stored media, due to the # try/except below. The media also won't be stored in # the DB. - raise SpamMediaException(errcode=spam_check) + # We currently ignore any additional field returned by + # the spam-check API. + raise SpamMediaException(errcode=spam_check[0]) for provider in self.storage_providers: await provider.store_file(path, file_info) |