From 7ae1e5c83aabb0db472f89274831e079bc3bc7fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20B=C3=BCchner?= Date: Mon, 16 Sep 2024 21:45:26 +0200 Subject: [PATCH] change some logging settings --- synapse_invite_checker/invite_checker.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/synapse_invite_checker/invite_checker.py b/synapse_invite_checker/invite_checker.py index b098b56..07e3778 100644 --- a/synapse_invite_checker/invite_checker.py +++ b/synapse_invite_checker/invite_checker.py @@ -24,7 +24,6 @@ class InviteCheckerConfig: def parse_config(config): return InviteCheckerConfig(config) - class InviteChecker: def __init__(self, config, api: ModuleApi): self.api = api @@ -190,7 +189,7 @@ class InviteChecker: @inlineCallbacks def user_may_invite(self, inviter: str, invitee: str, room_id: str): - logger.info(f"Checking invite from {inviter} to {invitee} for room {room_id}") + logger.debug(f"Checking invite from {inviter} to {invitee} for room {room_id}") if self.allow_all_invites_on_error: logger.info(f"Allowing invite from {inviter} to {invitee} due to previous JSON fetch failure.") returnValue("NOT_SPAM") @@ -198,7 +197,7 @@ class InviteChecker: blocklist, allowlist, blocklist_room_ids = yield self.get_blocklist_allowlist() inviter_domain = UserID.from_string(inviter).domain - if self.use_allowlist and inviter_domain in allowlist: + if self.use_allowlist and (inviter_domain in allowlist or inviter in allowlist): returnValue("NOT_SPAM") if room_id in blocklist_room_ids: