Skip to content

Commit 4647e06

Browse files
authored
feat: add message_type property to TalkBotMessage (#292)
Sample chat message structure: https://nextcloud-talk.readthedocs.io/en/latest/bots/#sample-chat-message Signed-off-by: Anupam Kumar <[email protected]>
1 parent fb3ee49 commit 4647e06

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nc_py_api/talk_bot.py

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ class TalkBotMessage:
2929
def __init__(self, raw_data: dict):
3030
self._raw_data = raw_data
3131

32+
@property
33+
def message_type(self) -> str:
34+
"""The type of message like Join, Leave, Create, Activity, etc."""
35+
return self._raw_data["type"]
36+
3237
@property
3338
def actor_id(self) -> str:
3439
"""One of the attendee types followed by the ``/`` character and a unique identifier within the given type.

0 commit comments

Comments
 (0)