Passthrough all events for check_event_for_spam.

We realise the PDU rate for most homeservers will not be
significant...  and if it is they can just disable the callback.
This commit is contained in:
gnuxie committed 2025-03-24 19:47:38 +00:00
1 parent e033d53127
commit 903a7b6dbc
1 file changed
+2 -4
@@ -131,10 +131,8 @@ export class SynapseHTTPAntispamRoomDiscovery
this: SynapseHTTPAntispamRoomDiscovery,
{ event }: CheckEventForSpamRequestBody
): void {
if (event.type === "m.room.member") {
if (!this.discoveredRooms.has(event.room_id)) {
this.batcher.add(event.room_id);
}
if (!this.discoveredRooms.has(event.room_id)) {
this.batcher.add(event.room_id);
}
}.bind(this);