mirror of
https://github.com/element-hq/synapse
synced 2024-08-19 02:10:55 +00:00
deploy: 829f2a82b0
This commit is contained in:
parent
90adb625c6
commit
357f3ff8e0
4 changed files with 22 additions and 2 deletions
|
@ -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>
|
||||
|
|
|
@ -7656,6 +7656,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>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue