diff options
author | babolivier <babolivier@users.noreply.github.com> | 2021-10-06 14:33:28 +0000 |
---|---|---|
committer | babolivier <babolivier@users.noreply.github.com> | 2021-10-06 14:33:28 +0000 |
commit | 357f3ff8e0c5b77a82e43075d4f564bc3def2fa6 (patch) | |
tree | 26e7864882565eb8faf1f843821d235f8311a680 /develop/modules | |
parent | deploy: 38b7db58859d80f06b8dc94e6a6dd19600778caa (diff) | |
download | synapse-357f3ff8e0c5b77a82e43075d4f564bc3def2fa6.tar.xz |
deploy: 829f2a82b042d944fef3df55faec924502cdf20d
Diffstat (limited to 'develop/modules')
-rw-r--r-- | develop/modules/spam_checker_callbacks.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/develop/modules/spam_checker_callbacks.html b/develop/modules/spam_checker_callbacks.html index dd035ec7fe..7ec822f1e0 100644 --- a/develop/modules/spam_checker_callbacks.html +++ b/develop/modules/spam_checker_callbacks.html @@ -195,6 +195,16 @@ Synapse instances. Spam checker callbacks can be registered using the module API either a <code>bool</code> to indicate whether the event must be rejected because of spam, or a <code>str</code> to indicate the event must be rejected because of spam and to give a rejection reason to forward to clients.</p> +<h3 id="user_may_join_room"><a class="header" href="#user_may_join_room"><code>user_may_join_room</code></a></h3> +<pre><code class="language-python">async def user_may_join_room(user: str, room: str, is_invited: bool) -> bool +</code></pre> +<p>Called when a user is trying to join a room. The module must return a <code>bool</code> to indicate +whether the user can join the room. The user is represented by their Matrix user ID (e.g. +<code>@alice:example.com</code>) and the room is represented by its Matrix ID (e.g. +<code>!room:example.com</code>). The module is also given a boolean to indicate whether the user +currently has a pending invite in the room.</p> +<p>This callback isn't called if the join is performed by a server administrator, or in the +context of a room creation.</p> <h3 id="user_may_invite"><a class="header" href="#user_may_invite"><code>user_may_invite</code></a></h3> <pre><code class="language-python">async def user_may_invite(inviter: str, invitee: str, room_id: str) -> bool </code></pre> |