| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2026-07-21 17:39:09 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2026-07-21 17:39:09 UTC |
| parent | 2ab331623368f7c28b0d24bad3d73221a299e6b0 |
| borogove/Client.hx | +4 | -2 |
diff --git a/borogove/Client.hx b/borogove/Client.hx index 6bdd87b..a2d3f69 100644 --- a/borogove/Client.hx +++ b/borogove/Client.hx @@ -1771,8 +1771,10 @@ class Client extends EventEmitter { final chatDomain = JID.parse(chat.chatId).domain; final ps = []; for (attachment in message.attachments) { - if (attachment.cachedAt != null && attachment.uris.find(uri -> uri.split("/")[2].split(":")[0].endsWith(chatDomain)) != null) { - ps.push(fetchAttachment(attachment)); + if (attachment.uris.find(uri -> uri.split("/")[2].split(":")[0].endsWith(chatDomain)) != null) { + attachment.lookup(persistence).then(lookedUp -> { + if (lookedUp.cachedAt == null) ps.push(fetchAttachment(attachment)); + }); } }