mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 01:26:12 +02:00
fix: logic error in image mime type checking
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user