From aae9390d1ea11d395bf473f8541476f663a63baf Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Tue, 25 Nov 2025 12:38:02 +0530 Subject: [PATCH] fix: handle bot join messages properly Signed-off-by: Anupam Kumar --- nc_py_api/talk_bot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nc_py_api/talk_bot.py b/nc_py_api/talk_bot.py index 1d4447f7..fc2c539d 100644 --- a/nc_py_api/talk_bot.py +++ b/nc_py_api/talk_bot.py @@ -76,11 +76,17 @@ def conversation_token(self) -> str: It can be used to react or reply to the given message. """ + # bot join + if self.message_type == "Join": + return self._raw_data["object"]["id"] return self._raw_data["target"]["id"] @property def conversation_name(self) -> str: """The name of the conversation in which the message was posted.""" + # bot join + if self.message_type == "Join": + return self._raw_data["object"]["name"] return self._raw_data["target"]["name"] def __repr__(self):