From f0ac2fba2fc028ecd57fc72942c672ecf711c1e5 Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 10 Aug 2023 16:12:43 +0300 Subject: [PATCH] chat error fix --- files/helpers/media.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/helpers/media.py b/files/helpers/media.py index 1eae2b69e..8d24589d0 100644 --- a/files/helpers/media.py +++ b/files/helpers/media.py @@ -57,8 +57,10 @@ def process_files(files, v, body, is_dm=False, dm_user=None): url = process_video(file, v) elif file.content_type.startswith('audio/'): url = f'{SITE_FULL}{process_audio(file, v)}' - else: + elif has_request_context(): abort(415) + else: + return None body = body.replace(f'[{file.filename}]', f' {url} ', 1)