From 5e67bd766604818a50df6e434bb072a5b8a5ccfd Mon Sep 17 00:00:00 2001 From: babolivier Date: Mon, 23 May 2022 17:28:14 +0000 Subject: deploy: 28199e93579b5a73841a95ed4d355322227432b5 --- develop/upgrade.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'develop/upgrade.html') diff --git a/develop/upgrade.html b/develop/upgrade.html index d25faa39d0..81eb4ce480 100644 --- a/develop/upgrade.html +++ b/develop/upgrade.html @@ -295,6 +295,27 @@ COMMIT;

This comment on issue 11779 has queries that can be used to check a database for this problem in advance.

+

SpamChecker API's check_event_for_spam has a new signature.

+

The previous signature has been deprecated.

+

Whereas 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"].

+

This is part of an ongoing refactoring of the SpamChecker API to make it less ambiguous and more powerful.

+

If your module implements check_event_for_spam as follows:

+
async def check_event_for_spam(event):
+    if ...:
+        # Event is spam
+        return True
+    # Event is not spam
+    return False
+
+

you should rewrite it as follows:

+
async def check_event_for_spam(event):
+    if ...:
+        # Event is spam, mark it as forbidden (you may use some more precise error
+        # code if it is useful).
+        return synapse.module_api.errors.Codes.FORBIDDEN
+    # Event is not spam, mark it as `ALLOW`.
+    return synapse.module_api.ALLOW
+

Upgrading to v1.59.0

Device name lookup over federation has been disabled by default

The names of user devices are no longer visible to users on other homeservers by default. -- cgit 1.4.1