merge develop & resolve conflict
This commit is contained in:
commit
5fd589d5e7
38 changed files with 528 additions and 227 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue