diff --git a/src/modules/fedimbed.js b/src/modules/fedimbed.js index 338249a..c38b409 100644 --- a/src/modules/fedimbed.js +++ b/src/modules/fedimbed.js @@ -661,10 +661,17 @@ async function fetchPost(url, platform, forceMastoAPI = false) { noteId = noteId.split("#")[0]; } logger.verbose("fedimbed", "Misskey post ID: " + noteId); - redirUrl = urlObj.origin + "/api/notes/show/"; - options.method = "POST"; - options.body = JSON.stringify({noteId}); - headers["Content-Type"] = "application/json"; + + // iceshrimp has an entire .NET rewrite and only supports MastoAPI it seems + // *should* be fine for older iceshrimp-js instances + if (platform == "iceshrimp") { + redirUrl = urlObj.origin + "/api/v1/statuses/" + noteId; + } else { + redirUrl = urlObj.origin + "/api/notes/show/"; + options.method = "POST"; + options.body = JSON.stringify({noteId}); + headers["Content-Type"] = "application/json"; + } } else { logger.error("fedimbed", `Missing MastoAPI replacement for "${platform}"`); } @@ -951,7 +958,7 @@ async function processUrl(msg, url, spoiler = false, command = false) { replyData.account?.fqn ?? `${replyData.account?.username ?? replyData.user?.username}@${urlObj.hostname}` })`; } else { - const authorData = await signedFetch(postData.actor ?? postData.attributedTo, { + const authorData = await signedFetch(replyData.actor ?? replyData.attributedTo, { headers: { "User-Agent": FRIENDLY_USERAGENT, Accept: "application/activity+json",