aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2024-01-08 21:48:31 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:55 +0100
commitca8dd313500a037412e023573f6ee77f84ece694 (patch)
tree706c94d3056889f28e54d165ba94d695d8af6aac
parent69bb654e85665b06818aa807fd51b151a487855b (diff)
downloadwee-slack-ca8dd313500a037412e023573f6ee77f84ece694.tar.gz
Support handling files that are not found
-rw-r--r--slack/slack_message.py5
1 files changed, 5 insertions, 0 deletions
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"])