From e59ecd1890631f05edff18c3fd11a09d738eb72c Mon Sep 17 00:00:00 2001 From: babolivier Date: Mon, 13 Jun 2022 18:16:55 +0000 Subject: deploy: a164a46038b0e51142781619db0e6dec8e0c2aaa --- develop/upgrade.html | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'develop/upgrade.html') diff --git a/develop/upgrade.html b/develop/upgrade.html index 2ae6a34709..207d940e4e 100644 --- a/develop/upgrade.html +++ b/develop/upgrade.html @@ -232,6 +232,37 @@ dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb +

Upgrading to v1.61.0

+

New signatures for spam checker callbacks

+

As a followup to changes in v1.60.0, the following spam-checker callbacks have changed signature:

+ +

For each of these methods, the previous callback signature has been deprecated.

+

Whereas callbacks used to return bool, they should now return Union["synapse.module_api.NOT_SPAM", "synapse.module_api.errors.Codes"].

+

For instance, if your module implements user_may_join_room as follows:

+
async def user_may_join_room(self, user_id: str, room_id: str, is_invited: bool)
+    if ...:
+        # Request is spam
+        return False
+    # Request is not spam
+    return True
+
+

you should rewrite it as follows:

+
async def user_may_join_room(self, user_id: str, room_id: str, is_invited: bool)
+    if ...:
+        # Request 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
+    # Request is not spam, mark it as such.
+    return synapse.module_api.NOT_SPAM
+

Upgrading to v1.60.0

Adding a new unique index to state_group_edges could fail if your database is corrupted

This release of Synapse will add a unique index to the state_group_edges table, in order -- cgit 1.5.1