deploy: b10257e879
This commit is contained in:
parent
2c3061badf
commit
c13050ddbf
|
@ -206,6 +206,27 @@ represented by their Matrix user ID (e.g. <code>@alice:example.com</code>).</p>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Called when processing a room creation request. The module must return a <code>bool</code> indicating
|
<p>Called when processing a room creation request. The module must return a <code>bool</code> indicating
|
||||||
whether the given user (represented by their Matrix user ID) is allowed to create a room.</p>
|
whether the given user (represented by their Matrix user ID) is allowed to create a room.</p>
|
||||||
|
<h3 id="user_may_create_room_with_invites"><a class="header" href="#user_may_create_room_with_invites"><code>user_may_create_room_with_invites</code></a></h3>
|
||||||
|
<pre><code class="language-python">async def user_may_create_room_with_invites(
|
||||||
|
user: str,
|
||||||
|
invites: List[str],
|
||||||
|
threepid_invites: List[Dict[str, str]],
|
||||||
|
) -> bool
|
||||||
|
</code></pre>
|
||||||
|
<p>Called when processing a room creation request (right after <code>user_may_create_room</code>).
|
||||||
|
The module is given the Matrix user ID of the user trying to create a room, as well as a
|
||||||
|
list of Matrix users to invite and a list of third-party identifiers (3PID, e.g. email
|
||||||
|
addresses) to invite.</p>
|
||||||
|
<p>An invited Matrix user to invite is represented by their Matrix user IDs, and an invited
|
||||||
|
3PIDs is represented by a dict that includes the 3PID medium (e.g. "email") through its
|
||||||
|
<code>medium</code> key and its address (e.g. "alice@example.com") through its <code>address</code> key.</p>
|
||||||
|
<p>See <a href="https://matrix.org/docs/spec/appendices#pid-types">the Matrix specification</a> for more
|
||||||
|
information regarding third-party identifiers.</p>
|
||||||
|
<p>If no invite and/or 3PID invite were specified in the room creation request, the
|
||||||
|
corresponding list(s) will be empty.</p>
|
||||||
|
<p><strong>Note</strong>: This callback is not called when a room is cloned (e.g. during a room upgrade)
|
||||||
|
since no invites are sent when cloning a room. To cover this case, modules also need to
|
||||||
|
implement <code>user_may_create_room</code>.</p>
|
||||||
<h3 id="user_may_create_room_alias"><a class="header" href="#user_may_create_room_alias"><code>user_may_create_room_alias</code></a></h3>
|
<h3 id="user_may_create_room_alias"><a class="header" href="#user_may_create_room_alias"><code>user_may_create_room_alias</code></a></h3>
|
||||||
<pre><code class="language-python">async def user_may_create_room_alias(user: str, room_alias: "synapse.types.RoomAlias") -> bool
|
<pre><code class="language-python">async def user_may_create_room_alias(user: str, room_alias: "synapse.types.RoomAlias") -> bool
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
|
@ -7660,6 +7660,27 @@ represented by their Matrix user ID (e.g. <code>@alice:example.com</code>).</p>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Called when processing a room creation request. The module must return a <code>bool</code> indicating
|
<p>Called when processing a room creation request. The module must return a <code>bool</code> indicating
|
||||||
whether the given user (represented by their Matrix user ID) is allowed to create a room.</p>
|
whether the given user (represented by their Matrix user ID) is allowed to create a room.</p>
|
||||||
|
<h3 id="user_may_create_room_with_invites"><a class="header" href="#user_may_create_room_with_invites"><code>user_may_create_room_with_invites</code></a></h3>
|
||||||
|
<pre><code class="language-python">async def user_may_create_room_with_invites(
|
||||||
|
user: str,
|
||||||
|
invites: List[str],
|
||||||
|
threepid_invites: List[Dict[str, str]],
|
||||||
|
) -> bool
|
||||||
|
</code></pre>
|
||||||
|
<p>Called when processing a room creation request (right after <code>user_may_create_room</code>).
|
||||||
|
The module is given the Matrix user ID of the user trying to create a room, as well as a
|
||||||
|
list of Matrix users to invite and a list of third-party identifiers (3PID, e.g. email
|
||||||
|
addresses) to invite.</p>
|
||||||
|
<p>An invited Matrix user to invite is represented by their Matrix user IDs, and an invited
|
||||||
|
3PIDs is represented by a dict that includes the 3PID medium (e.g. "email") through its
|
||||||
|
<code>medium</code> key and its address (e.g. "alice@example.com") through its <code>address</code> key.</p>
|
||||||
|
<p>See <a href="https://matrix.org/docs/spec/appendices#pid-types">the Matrix specification</a> for more
|
||||||
|
information regarding third-party identifiers.</p>
|
||||||
|
<p>If no invite and/or 3PID invite were specified in the room creation request, the
|
||||||
|
corresponding list(s) will be empty.</p>
|
||||||
|
<p><strong>Note</strong>: This callback is not called when a room is cloned (e.g. during a room upgrade)
|
||||||
|
since no invites are sent when cloning a room. To cover this case, modules also need to
|
||||||
|
implement <code>user_may_create_room</code>.</p>
|
||||||
<h3 id="user_may_create_room_alias"><a class="header" href="#user_may_create_room_alias"><code>user_may_create_room_alias</code></a></h3>
|
<h3 id="user_may_create_room_alias"><a class="header" href="#user_may_create_room_alias"><code>user_may_create_room_alias</code></a></h3>
|
||||||
<pre><code class="language-python">async def user_may_create_room_alias(user: str, room_alias: "synapse.types.RoomAlias") -> bool
|
<pre><code class="language-python">async def user_may_create_room_alias(user: str, room_alias: "synapse.types.RoomAlias") -> bool
|
||||||
</code></pre>
|
</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 New Issue