diff options
| author | dave <starpumadev@gmail.com> | 2019-03-26 10:52:46 -0400 |
|---|---|---|
| committer | dave <starpumadev@gmail.com> | 2019-03-26 10:52:46 -0400 |
| commit | 5fd589d5e717bbcbc46db5efb35878b993b6dfbc (patch) | |
| tree | 86691b1fa39bbd909307cd4f5eca368bde375661 /src/services/entity_normalizer/entity_normalizer.service.js | |
| parent | 13e727b5eebb60330bc87c7ccc70109683c5b963 (diff) | |
| parent | 2f1e69047882a1fc36f87dc1fff752bc76e61fa4 (diff) | |
merge develop & resolve conflict
Diffstat (limited to 'src/services/entity_normalizer/entity_normalizer.service.js')
| -rw-r--r-- | src/services/entity_normalizer/entity_normalizer.service.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 3bd42b94..249e99b4 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -128,14 +128,15 @@ export const parseUser = (data) => { return output } -const parseAttachment = (data) => { +export const parseAttachment = (data) => { const output = {} const masto = !data.hasOwnProperty('oembed') if (masto) { // Not exactly same... - output.mimetype = data.type + output.mimetype = data.pleroma ? data.pleroma.mime_type : data.type output.meta = data.meta // not present in BE yet + output.id = data.id } else { output.mimetype = data.mimetype // output.meta = ??? missing @@ -311,5 +312,5 @@ export const parseNotification = (data) => { const isNsfw = (status) => { const nsfwRegex = /#nsfw/i - return (status.tags || []).includes('nsfw') || !!status.text.match(nsfwRegex) + return (status.tags || []).includes('nsfw') || !!(status.text || '').match(nsfwRegex) } |
