From 109e9bcc67d11b63983c82118abfd62eb96fa588 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Sun, 10 Apr 2022 02:42:15 -0400 Subject: [PATCH] For outgoing messages, raise error if disconnected --- matrix_appservice_kakaotalk/portal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix_appservice_kakaotalk/portal.py b/matrix_appservice_kakaotalk/portal.py index dbfd14a..367cec8 100644 --- a/matrix_appservice_kakaotalk/portal.py +++ b/matrix_appservice_kakaotalk/portal.py @@ -773,8 +773,8 @@ class Portal(DBPortal, BasePortal): sender, is_relay = await self.get_relay_sender(orig_sender, f"message {event_id}") if not sender: raise Exception("not logged in") - elif not sender.has_state: - raise Exception("not connected to KakaoTalk") + elif not sender.is_connected: + raise Exception("not connected to KakaoTalk chats") elif is_relay: await self.apply_relay_message_format(orig_sender, message) if message.msgtype == MessageType.TEXT or message.msgtype == MessageType.NOTICE: