summary refs log tree commit diff
path: root/docs/spam_checker.md
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-02-03 16:44:16 +0000
committerErik Johnston <erik@matrix.org>2021-02-04 17:01:30 +0000
commit7e8083eb48fc22e1dde8b3a3d171f16acdfd6a25 (patch)
tree7859be162185846ebe98e4bb82b8bb951c671101 /docs/spam_checker.md
parentClarify documentation about escaping URLs in templates. (#9310) (diff)
downloadsynapse-7e8083eb48fc22e1dde8b3a3d171f16acdfd6a25.tar.xz
Add check_media_file_for_spam spam checker hook
Diffstat (limited to 'docs/spam_checker.md')
-rw-r--r--docs/spam_checker.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/spam_checker.md b/docs/spam_checker.md
index 5b4f6428e6..47a27bf85c 100644
--- a/docs/spam_checker.md
+++ b/docs/spam_checker.md
@@ -61,6 +61,9 @@ class ExampleSpamChecker:
 
     async def check_registration_for_spam(self, email_threepid, username, request_info):
         return RegistrationBehaviour.ALLOW  # allow all registrations
+
+    async def check_media_file_for_spam(self, file_wrapper, file_info):
+        return False  # allow all media
 ```
 
 ## Configuration