From ca8dd313500a037412e023573f6ee77f84ece694 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Mon, 8 Jan 2024 21:48:31 +0100 Subject: Support handling files that are not found --- slack/slack_message.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'slack') diff --git a/slack/slack_message.py b/slack/slack_message.py index f4f2f54..ade6522 100644 --- a/slack/slack_message.py +++ b/slack/slack_message.py @@ -1118,6 +1118,11 @@ class SlackMessage: shared.config.color.deleted_message.value, "(This file is not available because the workspace has passed its storage limit)", ) + if file.get("file_access") == "file_not_found": + text = with_color( + shared.config.color.deleted_message.value, + "(This file was not found)", + ) elif file.get("mimetype") == "application/vnd.slack-docs": url = f"{file['permalink']}?origin_team={self.workspace.id}&origin_channel={self.conversation.id}" text = format_url(url, file["title"]) -- cgit