diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-10-14 19:52:44 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:54 +0100 |
commit | 291ce07645f63614b3b00fbe20063d6ef0161bef (patch) | |
tree | f6b2d0f7412f1f3ac2c02d8c2ab2957d1dc338fa /slack/slack_thread.py | |
parent | 184bf08360003538179e3c19b2711016c823eadd (diff) | |
download | wee-slack-291ce07645f63614b3b00fbe20063d6ef0161bef.tar.gz |
Support sending messages
Diffstat (limited to 'slack/slack_thread.py')
-rw-r--r-- | slack/slack_thread.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/slack/slack_thread.py b/slack/slack_thread.py index 79ef68c..8033ff1 100644 --- a/slack/slack_thread.py +++ b/slack/slack_thread.py @@ -10,6 +10,7 @@ from slack.task import gather if TYPE_CHECKING: from typing_extensions import Literal + from slack.slack_conversation import SlackConversation from slack.slack_workspace import SlackWorkspace @@ -23,6 +24,10 @@ class SlackThread(SlackBuffer): return self.parent.workspace @property + def conversation(self) -> SlackConversation: + return self.parent.conversation + + @property def context(self) -> Literal["conversation", "thread"]: return "thread" @@ -116,3 +121,6 @@ class SlackThread(SlackBuffer): await self._api.subscriptions_thread_mark( self.parent.conversation, self.parent.ts, last_read_line_ts ) + + async def post_message(self, text: str) -> None: + await self._api.chat_post_message(self.conversation, text, self.parent.ts) |