From faf49dc30e9bbd0c0ce778e03751b831f8374a75 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 11 Aug 2022 21:28:08 -0400 Subject: [PATCH] don't include media for all notifications --- simplebot_mastodon/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simplebot_mastodon/util.py b/simplebot_mastodon/util.py index 2f459db..d050b3c 100644 --- a/simplebot_mastodon/util.py +++ b/simplebot_mastodon/util.py @@ -108,7 +108,7 @@ def toot2reply(prefix: str, toot: AttribAccessDict, notification: bool = False) else: reply["sender"] = _get_name(toot.account) - if toot.media_attachments: + if toot.media_attachments and (not notification or is_mention): reply["filename"] = toot.media_attachments.pop(0).url if toot.media_attachments: text += "\n".join(media.url for media in toot.media_attachments) + "\n\n"