mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-06 10:50:09 +00:00
deploy: 451a9dc7b9
This commit is contained in:
@@ -216,8 +216,9 @@ this callback.</p>
|
||||
<p><em>Changed in Synapse v1.62.0: <code>synapse.module_api.NOT_SPAM</code> and <code>synapse.module_api.errors.Codes</code> can be returned by this callback. Returning a boolean is now deprecated.</em> </p>
|
||||
<pre><code class="language-python">async def user_may_invite(inviter: str, invitee: str, room_id: str) -> Union["synapse.module_api.NOT_SPAM", "synapse.module_api.errors.Codes", bool]
|
||||
</code></pre>
|
||||
<p>Called when processing an invitation. Both inviter and invitee are
|
||||
represented by their Matrix user ID (e.g. <code>@alice:example.com</code>).</p>
|
||||
<p>Called when processing an invitation, both when one is created locally or when
|
||||
receiving an invite over federation. Both inviter and invitee are represented by
|
||||
their Matrix user ID (e.g. <code>@alice:example.com</code>).</p>
|
||||
<p>The callback must return one of:</p>
|
||||
<ul>
|
||||
<li>
|
||||
@@ -251,7 +252,9 @@ this callback.</p>
|
||||
) -> Union["synapse.module_api.NOT_SPAM", "synapse.module_api.errors.Codes", bool]
|
||||
</code></pre>
|
||||
<p>Called when processing an invitation using a third-party identifier (also called a 3PID,
|
||||
e.g. an email address or a phone number). </p>
|
||||
e.g. an email address or a phone number). It is only called when a 3PID invite is created
|
||||
locally - not when one is received in a room over federation. If the 3PID is already associated
|
||||
with a Matrix ID, the spam check will go through the <code>user_may_invite</code> callback instead.</p>
|
||||
<p>The inviter is represented by their Matrix user ID (e.g. <code>@alice:example.com</code>), and the
|
||||
invitee is represented by its medium (e.g. "email") and its address
|
||||
(e.g. <code>alice@example.com</code>). See <a href="https://matrix.org/docs/spec/appendices#pid-types">the Matrix specification</a>
|
||||
|
||||
Reference in New Issue
Block a user