From 283ff437695f7efb2f3e41473b75ad77a8d23efc Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Sat, 23 Apr 2022 17:04:41 -0400 Subject: [PATCH] Don't monitor outbound state events for non-open channel portals They can never be bridged, so allow them as Matrix-only customizations --- matrix_appservice_kakaotalk/portal.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/matrix_appservice_kakaotalk/portal.py b/matrix_appservice_kakaotalk/portal.py index a52310f..7b927f3 100644 --- a/matrix_appservice_kakaotalk/portal.py +++ b/matrix_appservice_kakaotalk/portal.py @@ -1092,6 +1092,9 @@ class Portal(DBPortal, BasePortal): # Misses should be guarded by supports_state_event, but handle this just in case self.log.error(f"Skipping Matrix state event {evt.event_id} of unsupported type {evt.type}") return + if not self.is_open: + self.log.info(f"Not bridging f{handler.action_name} change of portal for non-open channel") + return try: effective_sender, _ = await self.get_relay_sender(sender, f"{handler.action_name} {evt.event_id}") await handler.apply(self, effective_sender, evt.prev_content, evt.content)