Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions nc_py_api/talk_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down