summary refs log tree commit diff
path: root/docs/modules
diff options
context:
space:
mode:
authorWilson <leanhminh2907@gmail.com>2024-12-13 09:17:41 -0500
committerGitHub <noreply@github.com>2024-12-13 14:17:41 +0000
commiteedab12e6d794420b3b16e38cb4314dab6a9034c (patch)
tree7a61b3e153a68b86fe7b1ceffdfe468479ff163e /docs/modules
parentMerge branch 'master' into develop (diff)
downloadsynapse-eedab12e6d794420b3b16e38cb4314dab6a9034c.tar.xz
forward requester id to check username for spam callbacks (#17916)
Diffstat (limited to 'docs/modules')
-rw-r--r--docs/modules/spam_checker_callbacks.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/modules/spam_checker_callbacks.md b/docs/modules/spam_checker_callbacks.md

index ec306d81ab..c7f8606fd0 100644 --- a/docs/modules/spam_checker_callbacks.md +++ b/docs/modules/spam_checker_callbacks.md
@@ -245,7 +245,7 @@ this callback. _First introduced in Synapse v1.37.0_ ```python -async def check_username_for_spam(user_profile: synapse.module_api.UserProfile) -> bool +async def check_username_for_spam(user_profile: synapse.module_api.UserProfile, requester_id: str) -> bool ``` Called when computing search results in the user directory. The module must return a @@ -264,6 +264,8 @@ The profile is represented as a dictionary with the following keys: The module is given a copy of the original dictionary, so modifying it from within the module cannot modify a user's profile when included in user directory search results. +The requester_id parameter is the ID of the user that called the user directory API. + If multiple modules implement this callback, they will be considered in order. If a 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