From 1311ee4e56515df1b432827d129aceb4b2bba299 Mon Sep 17 00:00:00 2001 From: erikjohnston Date: Mon, 26 Jun 2023 14:13:18 +0000 Subject: deploy: 25c55a9d2267b09da3e18090ee538782d6771a27 --- develop/print.html | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'develop/print.html') diff --git a/develop/print.html b/develop/print.html index 2237bbf733..300c12be4b 100644 --- a/develop/print.html +++ b/develop/print.html @@ -9949,6 +9949,33 @@ doing.

callback returns False, Synapse falls through to the next one. The value of the first callback that does not return False will be used. If this happens, Synapse will not call any of the subsequent implementations of this callback.

+

check_login_for_spam

+

First introduced in Synapse v1.87.0

+
async def check_login_for_spam(
+    user_id: str,
+    device_id: Optional[str],
+    initial_display_name: Optional[str],
+    request_info: Collection[Tuple[Optional[str], str]],
+    auth_provider_id: Optional[str] = None,
+) -> Union["synapse.module_api.NOT_SPAM", "synapse.module_api.errors.Codes"]
+
+

Called when a user logs in.

+

The arguments passed to this callback are:

+ +

If multiple modules implement this callback, they will be considered in order. If a +callback returns synapse.module_api.NOT_SPAM, Synapse falls through to the next one. +The value of the first callback that does not return synapse.module_api.NOT_SPAM will +be used. If this happens, Synapse will not call any of the subsequent implementations of +this callback.

+

Note: This will not be called when a user registers.

Example

The example below is a module that implements the spam checker callback check_event_for_spam to deny any message sent by users whose Matrix user IDs are -- cgit 1.5.1