support for extended fields (for future, doesn't work yet), fix reply bug

This commit is contained in:
Henry Jameson 2019-01-19 04:10:16 +03:00
parent bac7154bc6
commit d231a45644

View file

@ -58,14 +58,12 @@ export const parseUser = (data) => {
output.statusnet_profile_url = data.url output.statusnet_profile_url = data.url
// FIXME missing if (data.pleroma) {
output.follows_you = null const pleroma = data.pleroma
output.follows_you = pleroma.follows_you
// FIXME ??????? output.statusnet_blocking = pleroma.statusnet_blocking
output.statusnet_blocking = false output.muted = pleroma.muted
}
// FIXME missing
output.muted = null
// Missing, trying to recover // Missing, trying to recover
output.is_local = !output.screen_name.includes('@') output.is_local = !output.screen_name.includes('@')
@ -204,11 +202,7 @@ export const parseStatus = (data) => {
output.user = parseUser(masto ? data.account : data.user) output.user = parseUser(masto ? data.account : data.user)
output.attentions = ((masto ? data.mentions : data.attentions) || []) output.attentions = ((masto ? data.mentions : data.attentions) || []).map(parseUser)
.map(_ => ({
id: _.id,
following: _.following // FIXME: MastoAPI doesn't have this
}))
output.attachments = ((masto ? data.media_attachments : data.attachments) || []) output.attachments = ((masto ? data.media_attachments : data.attachments) || [])
.map(parseAttachment) .map(parseAttachment)