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

Commit 78d5896

Browse files
authored
Document the version of Synapse each module callback was introduced in (#11132)
* Mention callbacks introduced in v1.37.0 According to the documentation introduced in #10062 * Mention callbacks introduced in v1.39.0 According to #10386 and #9884 * Mention callbacks introduced in v1.42.0 According to #10524 * Mention callbacks introduced in v1.44.0 and v1.45.0 As per #10898, #10910 and #10894 * Mention callbacks introduced in v1.46.0 According to #10548
1 parent 0dd0c40 commit 78d5896

6 files changed

+45
-0
lines changed

changelog.d/11132.doc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Document the version of Synapse each module callback was introduced in.

docs/modules/account_validity_callbacks.md

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ The available account validity callbacks are:
99

1010
### `is_user_expired`
1111

12+
_First introduced in Synapse v1.39.0_
13+
1214
```python
1315
async def is_user_expired(user: str) -> Optional[bool]
1416
```
@@ -29,6 +31,8 @@ any of the subsequent implementations of this callback.
2931

3032
### `on_user_registration`
3133

34+
_First introduced in Synapse v1.39.0_
35+
3236
```python
3337
async def on_user_registration(user: str) -> None
3438
```

docs/modules/password_auth_provider_callbacks.md

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ registered by using the Module API's `register_password_auth_provider_callbacks`
88

99
### `auth_checkers`
1010

11+
_First introduced in Synapse v1.46.0_
12+
1113
```
1214
auth_checkers: Dict[Tuple[str,Tuple], Callable]
1315
```
@@ -55,6 +57,8 @@ authentication fails.
5557

5658
### `check_3pid_auth`
5759

60+
_First introduced in Synapse v1.46.0_
61+
5862
```python
5963
async def check_3pid_auth(
6064
medium: str,
@@ -86,6 +90,8 @@ the authentication is denied.
8690

8791
### `on_logged_out`
8892

93+
_First introduced in Synapse v1.46.0_
94+
8995
```python
9096
async def on_logged_out(
9197
user_id: str,

docs/modules/presence_router_callbacks.md

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ The available presence router callbacks are:
1010

1111
### `get_users_for_states`
1212

13+
_First introduced in Synapse v1.42.0_
14+
1315
```python
1416
async def get_users_for_states(
1517
state_updates: Iterable["synapse.api.UserPresenceState"],
@@ -30,6 +32,8 @@ Synapse concatenates the sets associated with this key from each dictionary.
3032

3133
### `get_interested_users`
3234

35+
_First introduced in Synapse v1.42.0_
36+
3337
```python
3438
async def get_interested_users(
3539
user_id: str

docs/modules/spam_checker_callbacks.md

+22
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ The available spam checker callbacks are:
1010

1111
### `check_event_for_spam`
1212

13+
_First introduced in Synapse v1.37.0_
14+
1315
```python
1416
async def check_event_for_spam(event: "synapse.events.EventBase") -> Union[bool, str]
1517
```
@@ -26,6 +28,8 @@ any of the subsequent implementations of this callback.
2628

2729
### `user_may_join_room`
2830

31+
_First introduced in Synapse v1.37.0_
32+
2933
```python
3034
async def user_may_join_room(user: str, room: str, is_invited: bool) -> bool
3135
```
@@ -46,6 +50,8 @@ any of the subsequent implementations of this callback.
4650

4751
### `user_may_invite`
4852

53+
_First introduced in Synapse v1.37.0_
54+
4955
```python
5056
async def user_may_invite(inviter: str, invitee: str, room_id: str) -> bool
5157
```
@@ -61,6 +67,8 @@ any of the subsequent implementations of this callback.
6167

6268
### `user_may_send_3pid_invite`
6369

70+
_First introduced in Synapse v1.45.0_
71+
6472
```python
6573
async def user_may_send_3pid_invite(
6674
inviter: str,
@@ -101,6 +109,8 @@ any of the subsequent implementations of this callback.
101109

102110
### `user_may_create_room`
103111

112+
_First introduced in Synapse v1.37.0_
113+
104114
```python
105115
async def user_may_create_room(user: str) -> bool
106116
```
@@ -115,6 +125,8 @@ any of the subsequent implementations of this callback.
115125

116126
### `user_may_create_room_with_invites`
117127

128+
_First introduced in Synapse v1.44.0_
129+
118130
```python
119131
async def user_may_create_room_with_invites(
120132
user: str,
@@ -149,6 +161,8 @@ any of the subsequent implementations of this callback.
149161

150162
### `user_may_create_room_alias`
151163

164+
_First introduced in Synapse v1.37.0_
165+
152166
```python
153167
async def user_may_create_room_alias(user: str, room_alias: "synapse.types.RoomAlias") -> bool
154168
```
@@ -164,6 +178,8 @@ any of the subsequent implementations of this callback.
164178

165179
### `user_may_publish_room`
166180

181+
_First introduced in Synapse v1.37.0_
182+
167183
```python
168184
async def user_may_publish_room(user: str, room_id: str) -> bool
169185
```
@@ -179,6 +195,8 @@ any of the subsequent implementations of this callback.
179195

180196
### `check_username_for_spam`
181197

198+
_First introduced in Synapse v1.37.0_
199+
182200
```python
183201
async def check_username_for_spam(user_profile: Dict[str, str]) -> bool
184202
```
@@ -201,6 +219,8 @@ any of the subsequent implementations of this callback.
201219

202220
### `check_registration_for_spam`
203221

222+
_First introduced in Synapse v1.37.0_
223+
204224
```python
205225
async def check_registration_for_spam(
206226
email_threepid: Optional[dict],
@@ -232,6 +252,8 @@ this callback.
232252

233253
### `check_media_file_for_spam`
234254

255+
_First introduced in Synapse v1.37.0_
256+
235257
```python
236258
async def check_media_file_for_spam(
237259
file_wrapper: "synapse.rest.media.v1.media_storage.ReadableFileWrapper",

docs/modules/third_party_rules_callbacks.md

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ The available third party rules callbacks are:
1010

1111
### `check_event_allowed`
1212

13+
_First introduced in Synapse v1.39.0_
14+
1315
```python
1416
async def check_event_allowed(
1517
event: "synapse.events.EventBase",
@@ -51,6 +53,8 @@ any of the subsequent implementations of this callback.
5153

5254
### `on_create_room`
5355

56+
_First introduced in Synapse v1.39.0_
57+
5458
```python
5559
async def on_create_room(
5660
requester: "synapse.types.Requester",
@@ -76,6 +80,8 @@ callback.
7680

7781
### `check_threepid_can_be_invited`
7882

83+
_First introduced in Synapse v1.39.0_
84+
7985
```python
8086
async def check_threepid_can_be_invited(
8187
medium: str,
@@ -94,6 +100,8 @@ any of the subsequent implementations of this callback.
94100

95101
### `check_visibility_can_be_modified`
96102

103+
_First introduced in Synapse v1.39.0_
104+
97105
```python
98106
async def check_visibility_can_be_modified(
99107
room_id: str,

0 commit comments

Comments
 (0)