aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'slack/slack_api.py')
-rw-r--r--slack/slack_api.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/slack/slack_api.py b/slack/slack_api.py
index 8e0b28a..9f57fdd 100644
--- a/slack/slack_api.py
+++ b/slack/slack_api.py
@@ -142,6 +142,22 @@ class SlackApi(SlackApiCommon):
raise SlackApiError(self.workspace, method, response, params)
return response
+ async def fetch_conversations_history_after(
+ self, conversation: SlackConversation, after: SlackTs
+ ):
+ method = "conversations.history"
+ params: Params = {
+ "channel": conversation.id,
+ "oldest": after,
+ "inclusive": False,
+ }
+ response: SlackConversationsHistoryResponse = await self._fetch_list(
+ method, "messages", params
+ )
+ if response["ok"] is False:
+ raise SlackApiError(self.workspace, method, response, params)
+ return response
+
async def fetch_conversations_replies(
self, conversation: SlackConversation, parent_message_ts: SlackTs
):