For outgoing messages, raise error if disconnected
This commit is contained in:
parent
7b96687dae
commit
109e9bcc67
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue