This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into dmr/typing/wip
- Loading branch information
Showing
56 changed files
with
613 additions
and
182 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Automatically request reviews from the synapse-core team when a pull request comes in. | ||
* @matrix-org/synapse-core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add a `user_may_send_3pid_invite` spam checker callback for modules to allow or deny 3PID invites. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add a spam checker callback to allow or deny room joins. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Use direct references to config flags. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add additional content to the Welcome and Overview page of the documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add a `CODEOWNERS` file to automatically request reviews from the `@matrix-org/synapse-core` team on new pull requests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Correct a bugfix introduced in Synapse v1.44.0 that wouldn't catch every error of the connection breaks before a response could be written to it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix a long-standing bug where local users' per-room nicknames/avatars were visible to anyone who could see you in the user_directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add further type hints to `synapse.state`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Clean up some of the federation event authentication code for clarity. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Clean up some of the federation event authentication code for clarity. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Ensure that cache config tests do not share state. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,21 @@ either a `bool` to indicate whether the event must be rejected because of spam, | |
to indicate the event must be rejected because of spam and to give a rejection reason to | ||
forward to clients. | ||
|
||
### `user_may_join_room` | ||
|
||
```python | ||
async def user_may_join_room(user: str, room: str, is_invited: bool) -> bool | ||
``` | ||
|
||
Called when a user is trying to join a room. The module must return a `bool` to indicate | ||
whether the user can join the room. The user is represented by their Matrix user ID (e.g. | ||
`@alice:example.com`) and the room is represented by its Matrix ID (e.g. | ||
`!room:example.com`). The module is also given a boolean to indicate whether the user | ||
currently has a pending invite in the room. | ||
|
||
This callback isn't called if the join is performed by a server administrator, or in the | ||
context of a room creation. | ||
|
||
### `user_may_invite` | ||
|
||
```python | ||
|
@@ -29,6 +44,41 @@ Called when processing an invitation. The module must return a `bool` indicating | |
the inviter can invite the invitee to the given room. Both inviter and invitee are | ||
represented by their Matrix user ID (e.g. `@alice:example.com`). | ||
|
||
### `user_may_send_3pid_invite` | ||
|
||
```python | ||
async def user_may_send_3pid_invite( | ||
inviter: str, | ||
medium: str, | ||
address: str, | ||
room_id: str, | ||
) -> bool | ||
``` | ||
|
||
Called when processing an invitation using a third-party identifier (also called a 3PID, | ||
e.g. an email address or a phone number). The module must return a `bool` indicating | ||
whether the inviter can invite the invitee to the given room. | ||
|
||
The inviter is represented by their Matrix user ID (e.g. `@alice:example.com`), and the | ||
invitee is represented by its medium (e.g. "email") and its address | ||
(e.g. `alice@example.com`). See [the Matrix specification](https://matrix.org/docs/spec/appendices#pid-types) | ||
for more information regarding third-party identifiers. | ||
|
||
For example, a call to this callback to send an invitation to the email address | ||
`alice@example.com` would look like this: | ||
|
||
```python | ||
await user_may_send_3pid_invite( | ||
"@bob:example.com", # The inviter's user ID | ||
"email", # The medium of the 3PID to invite | ||
"[email protected]", # The address of the 3PID to invite | ||
"!some_room:example.com", # The ID of the room to send the invite into | ||
) | ||
``` | ||
|
||
**Note**: If the third-party identifier is already associated with a matrix user ID, | ||
[`user_may_invite`](#user_may_invite) will be used instead. | ||
|
||
### `user_may_create_room` | ||
|
||
```python | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.