fedimbed: we love non-standard activitystream implementations

This commit is contained in:
Cynthia Foxwell 2025-03-28 09:20:37 -06:00
parent 60631bba37
commit 2388f0cc47
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -997,6 +997,7 @@ async function processUrl(msg, url, spoiler = false, command = false) {
}
}
if (postData.attachment) {
// NB: gts doesnt send singular attachments as array
const attachments = Array.isArray(postData.attachment) ? postData.attachment : [postData.attachment];
for (const attachment of attachments) {
@ -1082,6 +1083,7 @@ async function processUrl(msg, url, spoiler = false, command = false) {
if (!spoiler && postData.sensitive && attachments.length > 0) {
spoiler = true;
}
}
if (postData.image?.url) {
const imageUrl = new URL(postData.image.url);