Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Document the version of Synapse each module callback was introduced in #11132

Merged
merged 6 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/11132.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document the version of Synapse each module callback was introduced in.
4 changes: 4 additions & 0 deletions docs/modules/account_validity_callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The available account validity callbacks are:

### `is_user_expired`

_First introduced in Synapse v1.39.0_

```python
async def is_user_expired(user: str) -> Optional[bool]
```
Expand All @@ -29,6 +31,8 @@ any of the subsequent implementations of this callback.

### `on_user_registration`

_First introduced in Synapse v1.39.0_

```python
async def on_user_registration(user: str) -> None
```
Expand Down
6 changes: 6 additions & 0 deletions docs/modules/password_auth_provider_callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ registered by using the Module API's `register_password_auth_provider_callbacks`

### `auth_checkers`

_First introduced in Synapse v1.46.0_

```
auth_checkers: Dict[Tuple[str,Tuple], Callable]
```
Expand Down Expand Up @@ -55,6 +57,8 @@ authentication fails.

### `check_3pid_auth`

_First introduced in Synapse v1.46.0_

```python
async def check_3pid_auth(
medium: str,
Expand Down Expand Up @@ -86,6 +90,8 @@ the authentication is denied.

### `on_logged_out`

_First introduced in Synapse v1.46.0_

```python
async def on_logged_out(
user_id: str,
Expand Down
4 changes: 4 additions & 0 deletions docs/modules/presence_router_callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ The available presence router callbacks are:

### `get_users_for_states`

_First introduced in Synapse v1.42.0_

```python
async def get_users_for_states(
state_updates: Iterable["synapse.api.UserPresenceState"],
Expand All @@ -30,6 +32,8 @@ Synapse concatenates the sets associated with this key from each dictionary.

### `get_interested_users`

_First introduced in Synapse v1.42.0_

```python
async def get_interested_users(
user_id: str
Expand Down
22 changes: 22 additions & 0 deletions docs/modules/spam_checker_callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ The available spam checker callbacks are:

### `check_event_for_spam`

_First introduced in Synapse v1.37.0_

```python
async def check_event_for_spam(event: "synapse.events.EventBase") -> Union[bool, str]
```
Expand All @@ -26,6 +28,8 @@ any of the subsequent implementations of this callback.

### `user_may_join_room`

_First introduced in Synapse v1.37.0_

```python
async def user_may_join_room(user: str, room: str, is_invited: bool) -> bool
```
Expand All @@ -46,6 +50,8 @@ any of the subsequent implementations of this callback.

### `user_may_invite`

_First introduced in Synapse v1.37.0_

```python
async def user_may_invite(inviter: str, invitee: str, room_id: str) -> bool
```
Expand All @@ -61,6 +67,8 @@ any of the subsequent implementations of this callback.

### `user_may_send_3pid_invite`

_First introduced in Synapse v1.45.0_

```python
async def user_may_send_3pid_invite(
inviter: str,
Expand Down Expand Up @@ -101,6 +109,8 @@ any of the subsequent implementations of this callback.

### `user_may_create_room`

_First introduced in Synapse v1.37.0_

```python
async def user_may_create_room(user: str) -> bool
```
Expand All @@ -115,6 +125,8 @@ any of the subsequent implementations of this callback.

### `user_may_create_room_with_invites`

_First introduced in Synapse v1.44.0_

```python
async def user_may_create_room_with_invites(
user: str,
Expand Down Expand Up @@ -149,6 +161,8 @@ any of the subsequent implementations of this callback.

### `user_may_create_room_alias`

_First introduced in Synapse v1.37.0_

```python
async def user_may_create_room_alias(user: str, room_alias: "synapse.types.RoomAlias") -> bool
```
Expand All @@ -164,6 +178,8 @@ any of the subsequent implementations of this callback.

### `user_may_publish_room`

_First introduced in Synapse v1.37.0_

```python
async def user_may_publish_room(user: str, room_id: str) -> bool
```
Expand All @@ -179,6 +195,8 @@ any of the subsequent implementations of this callback.

### `check_username_for_spam`

_First introduced in Synapse v1.37.0_

```python
async def check_username_for_spam(user_profile: Dict[str, str]) -> bool
```
Expand All @@ -201,6 +219,8 @@ any of the subsequent implementations of this callback.

### `check_registration_for_spam`

_First introduced in Synapse v1.37.0_

```python
async def check_registration_for_spam(
email_threepid: Optional[dict],
Expand Down Expand Up @@ -232,6 +252,8 @@ this callback.

### `check_media_file_for_spam`

_First introduced in Synapse v1.37.0_

```python
async def check_media_file_for_spam(
file_wrapper: "synapse.rest.media.v1.media_storage.ReadableFileWrapper",
Expand Down
8 changes: 8 additions & 0 deletions docs/modules/third_party_rules_callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ The available third party rules callbacks are:

### `check_event_allowed`

_First introduced in Synapse v1.39.0_

```python
async def check_event_allowed(
event: "synapse.events.EventBase",
Expand Down Expand Up @@ -51,6 +53,8 @@ any of the subsequent implementations of this callback.

### `on_create_room`

_First introduced in Synapse v1.39.0_

```python
async def on_create_room(
requester: "synapse.types.Requester",
Expand All @@ -76,6 +80,8 @@ callback.

### `check_threepid_can_be_invited`

_First introduced in Synapse v1.39.0_

```python
async def check_threepid_can_be_invited(
medium: str,
Expand All @@ -94,6 +100,8 @@ any of the subsequent implementations of this callback.

### `check_visibility_can_be_modified`

_First introduced in Synapse v1.39.0_

```python
async def check_visibility_can_be_modified(
room_id: str,
Expand Down