diff --git a/src/modules/fedimbed.js b/src/modules/fedimbed.js index 9e953d9..65609cf 100644 --- a/src/modules/fedimbed.js +++ b/src/modules/fedimbed.js @@ -508,7 +508,7 @@ async function processUrl(msg, url, spoiler = false) { type: attachment.mediaType, }); } - } else { + } else if (attachment.url) { const contentType = await fetch(attachment.url, { method: "HEAD", }).then((res) => res.headers.get("Content-Type")); @@ -572,6 +572,10 @@ async function processUrl(msg, url, spoiler = false) { }); } } + } else { + logger.warn( + `Unhandled attachment structure! ${JSON.stringify(attachment)}` + ); } }