From 6fdbc182ca722dbb12d92e4bf26e841ccda8303d Mon Sep 17 00:00:00 2001
From: taehoon
Date: Sun, 17 Mar 2019 23:42:07 -0400
Subject: [PATCH] Add fallback for attachments uploaded via the other platforms
---
src/services/entity_normalizer/entity_normalizer.service.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
index 0d653207..35c28ec0 100644
--- a/src/services/entity_normalizer/entity_normalizer.service.js
+++ b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -133,7 +133,8 @@ export const parseAttachment = (data) => {
const masto = !data.hasOwnProperty('oembed')
if (masto) {
- output.mimetype = data.pleroma.mime_type
+ // Not exactly same...
+ output.mimetype = data.pleroma ? data.pleroma.mime_type : data.type
output.meta = data.meta // not present in BE yet
} else {
output.mimetype = data.mimetype