fix: logic error in image mime type checking

This commit is contained in:
Julian Lam
2025-10-08 11:07:43 -04:00
parent 79327e6cac
commit 623cec9d91

View File

@@ -104,7 +104,7 @@ Mocks._normalize = async (object) => {
if (image) {
const parsed = new URL(image);
const type = mime.getType(parsed.pathname);
if (!type || type.startsWith('image/')) {
if (!type || !type.startsWith('image/')) {
activitypub.helpers.log(`[activitypub/mocks.post] Received image not identified as image due to MIME type: ${image}`);
image = null;
}