Hugh Nimmo-Smith
fd8fa97b6a
Document and fix room_config param when user_may_create_room callback is invoked for a room upgrade ( #18721 )
...
Co-authored-by: Eric Eastwood <erice@element.io>
2025-09-24 21:42:19 +00:00
Tulir Asokan
434e38941a
Add federated_user_may_invite spam checker callback ( #18241 )
...
Co-authored-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2025-06-26 12:27:21 +01:00
Andrew Morgan
1ab35a0a78
Mark new module APIs as experimental ( #18536 )
2025-06-10 11:13:47 +01:00
Hugh Nimmo-Smith
28f21b4036
Add user_may_send_state_event callback to spam checker module API ( #18455 )
2025-06-04 11:26:04 +00:00
Hugh Nimmo-Smith
fbe7a898f0
Pass room_config argument to user_may_create_room spam checker module callback ( #18486 )
...
This PR adds an additional `room_config` argument to the
`user_may_create_room` spam checker module API callback.
It will continue to work with implementations of `user_may_create_room`
that do not expect the additional parameter.
A side affect is that on a room upgrade the spam checker callback is
called *after* doing some work to calculate the state rather than
before. However, I hope that this is acceptable given the relative
infrequency of room upgrades.
2025-06-04 11:30:45 +01:00
Shay
411d239db4
Apply should_drop_federated_event to federation invites ( #18330 )
...
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2025-05-02 13:04:01 +00:00
Wilson
eedab12e6d
forward requester id to check username for spam callbacks ( #17916 )
2024-12-13 14:17:41 +00:00
Andrew Morgan
451a9dc7b9
Clarify when 3PID invite module callbacks are called ( #17627 )
...
Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
2024-10-14 11:31:49 +01:00
Erik Johnston
25c55a9d22
Add login spam checker API ( #15838 )
2023-06-26 14:12:20 +00:00
Patrick Cloke
69553052cc
Update spam checker documentation for moved media modules. ( #15175 )
2023-02-28 12:51:11 -05:00
Brendan Abolivier
bdb6628dcf
Fix version number in spam checker callbacks doc ( #13047 )
2022-06-14 17:24:25 +02:00
David Teller
a164a46038
Uniformize spam-checker API, part 4: port other spam-checker callbacks to return Union[Allow, Codes]. ( #12857 )
...
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
2022-06-13 18:16:16 +00:00
Brendan Abolivier
8fd87739bf
Fix import in module_api module and docs on the new check_event_for_spam signature ( #12918 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2022-05-31 12:04:53 +02:00
David Teller
28199e9357
Uniformize spam-checker API, part 2: check_event_for_spam ( #12808 )
...
Signed-off-by: David Teller <davidt@element.io>
2022-05-23 17:27:39 +00:00
Jess Porter
a608ac847b
add SpamChecker callback for silently dropping inbound federated events ( #12744 )
...
Signed-off-by: jesopo <github@lolnerd.net>
2022-05-23 16:36:21 +00:00
David Robertson
872dbb0181
Correct check_username_for_spam annotations and docs ( #12246 )
...
* Formally type the UserProfile in user searches
* export UserProfile in synapse.module_api
* Update docs
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
2022-03-18 13:51:41 +00:00
David Robertson
73fc488783
Explain the meaning of spam checker callbacks' return values ( #12003 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
2022-02-16 12:25:43 +00:00
Brendan Abolivier
e320f5dba3
Deprecate user_may_create_room_with_invites ( #11206 )
2021-11-01 10:46:08 +01:00
Brendan Abolivier
78d5896d19
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 https://github.com/matrix-org/synapse/pull/10062
* Mention callbacks introduced in v1.39.0
According to https://github.com/matrix-org/synapse/pull/10386 and https://github.com/matrix-org/synapse/pull/9884
* Mention callbacks introduced in v1.42.0
According to https://github.com/matrix-org/synapse/pull/10524
* Mention callbacks introduced in v1.44.0 and v1.45.0
As per https://github.com/matrix-org/synapse/pull/10898 , https://github.com/matrix-org/synapse/pull/10910 and https://github.com/matrix-org/synapse/pull/10894
* Mention callbacks introduced in v1.46.0
According to https://github.com/matrix-org/synapse/pull/10548
2021-10-20 11:04:27 +00:00
Brendan Abolivier
73743b8ad1
Document Synapse's behaviour when dealing with multiple modules ( #11096 )
...
Document Synapse's behaviour when multiple modules register the same
callback/web resource/etc.
Co-authored-by: reivilibre <oliverw@matrix.org>
2021-10-18 18:26:52 +02:00
Brendan Abolivier
4e51621064
Add a spamchecker method to allow or deny 3pid invites ( #10894 )
...
This is in the context of creating new module callbacks that modules in https://github.com/matrix-org/synapse-dinsic can use, in an effort to reconcile the spam checker API in synapse-dinsic with the one in mainline.
Note that a module callback already exists for 3pid invites (https://matrix-org.github.io/synapse/develop/modules/third_party_rules_callbacks.html#check_threepid_can_be_invited ) but it doesn't check whether the sender of the invite is allowed to send it.
2021-10-06 17:18:13 +02:00
Brendan Abolivier
829f2a82b0
Add a spamchecker callback to allow or deny room joins ( #10910 )
...
Co-authored-by: Erik Johnston <erik@matrix.org>
2021-10-06 14:32:16 +00:00
Brendan Abolivier
b10257e879
Add a spamchecker callback to allow or deny room creation based on invites ( #10898 )
...
This is in the context of creating new module callbacks that modules in https://github.com/matrix-org/synapse-dinsic can use, in an effort to reconcile the spam checker API in synapse-dinsic with the one in mainline.
This adds a callback that's fairly similar to user_may_create_room except it also allows processing based on the invites sent at room creation.
2021-09-24 16:38:23 +02:00
Charles Wright
6b6bb81b23
Fix #10837 by adding JSON encoding/decoding to the Module API example… ( #10845 )
2021-09-17 18:04:37 +01:00
Brendan Abolivier
03caba6577
Improve the modules doc ( #10758 )
...
* Split up the documentation in several files rather than one huge one
* Add examples for each callback category
* Other niceties like fixing https://github.com/matrix-org/synapse/issues/10632
* Add titles to callbacks so they're easier to find in the navigation panels and link to
2021-09-08 17:14:54 +00:00