From 7926ac8a51eb85806f7ad533f662899a7393cdc6 Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Wed, 4 Sep 2024 13:04:27 +0530 Subject: [PATCH] feat: add message_type property to TalkBotMessage Signed-off-by: Anupam Kumar --- nc_py_api/talk_bot.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nc_py_api/talk_bot.py b/nc_py_api/talk_bot.py index 3a0c3270..3b29160c 100644 --- a/nc_py_api/talk_bot.py +++ b/nc_py_api/talk_bot.py @@ -29,6 +29,11 @@ class TalkBotMessage: def __init__(self, raw_data: dict): self._raw_data = raw_data + @property + def message_type(self) -> str: + """The type of message like Join, Leave, Create, Activity, etc.""" + return self._raw_data["type"] + @property def actor_id(self) -> str: """One of the attendee types followed by the ``/`` character and a unique identifier within the given type.