From 25eebe534e5fd4fe5ecd2947dde386549c3313ec Mon Sep 17 00:00:00 2001
From: erikjohnston This comment on issue 11779
has queries that can be used to check a database for this problem in advance. The previous signature has been deprecated. Whereas Whereas This is part of an ongoing refactoring of the SpamChecker API to make it less ambiguous and more powerful. If your module implements SpamChecker API's
+check_event_for_spam
has a new signature.New signature for the spam checker callback
check_event_for_spam
check_event_for_spam
callbacks used to return Union[str, bool]
, they should now return Union["synapse.module_api.Allow", "synapse.module_api.errors.Codes"]
.check_event_for_spam
callbacks used to return Union[str, bool]
, they should now return Union["synapse.module_api.NOT_SPAM", "synapse.module_api.errors.Codes"]
.check_event_for_spam
as follows:async def check_event_for_spam(event):
@@ -313,8 +313,8 @@ has queries that can be used to check a database for this problem in advance.