From f5dc1e5601a441a2378298e7b15490faab904584 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Mon, 21 Aug 2023 18:32:17 +0200 Subject: Render me/action messages correctly --- typings/slack_api/slack_conversations_history.pyi | 8 ++++++++ typings/slack_rtm/slack_rtm_message.pyi | 6 ++++++ 2 files changed, 14 insertions(+) (limited to 'typings') diff --git a/typings/slack_api/slack_conversations_history.pyi b/typings/slack_api/slack_conversations_history.pyi index 8b2118a..ebedc78 100644 --- a/typings/slack_api/slack_conversations_history.pyi +++ b/typings/slack_api/slack_conversations_history.pyi @@ -103,6 +103,13 @@ class SlackMessageStandardCommon(SlackMessageCommon): class SlackMessageStandardFinal(SlackMessageStandardCommon): pass +class SlackMessageMe(SlackMessageStandardCommon): + subtype: Literal["me_message"] + +@final +class SlackMessageMeFinal(SlackMessageMe): + pass + class SlackMessageThreadParentCommon(SlackMessageStandardCommon): thread_ts: str reply_count: int @@ -186,6 +193,7 @@ class SlackMessageSubtypeChannelLeaveFinal(SlackMessageSubtypeChannelLeave): SlackMessage = ( SlackMessageStandardFinal + | SlackMessageMeFinal | SlackMessageThreadParentNotSubscribedFinal | SlackMessageThreadParentSubscribedFinal | SlackMessageWithFilesFinal diff --git a/typings/slack_rtm/slack_rtm_message.pyi b/typings/slack_rtm/slack_rtm_message.pyi index d6840ec..1fae2d6 100644 --- a/typings/slack_rtm/slack_rtm_message.pyi +++ b/typings/slack_rtm/slack_rtm_message.pyi @@ -1,5 +1,6 @@ from slack_api.slack_conversations_history import ( SlackMessage, + SlackMessageMe, SlackMessageStandardCommon, SlackMessageSubtypeBotAdd, SlackMessageSubtypeBotMessage, @@ -23,6 +24,10 @@ class SlackRtmHello(TypedDict): class SlackMessageStandardRtm(SlackMessageStandardCommon): channel: str +@final +class SlackMessageMeRtm(SlackMessageMe): + channel: str + @final class SlackMessageThreadParentNotSubscribedRtm(SlackMessageThreadParentNotSubscribed): channel: str @@ -123,6 +128,7 @@ class SlackUserTyping(TypedDict): SlackMessageRtm = ( SlackMessageStandardRtm + | SlackMessageMeRtm | SlackMessageThreadParentNotSubscribedRtm | SlackMessageThreadParentSubscribedRtm | SlackMessageWithFilesRtm -- cgit