forked from AkkomaGang/akkoma-fe
#436: clean up based on comment
This commit is contained in:
parent
e5786f32a7
commit
241503346f
1 changed files with 2 additions and 4 deletions
|
@ -251,13 +251,12 @@ export const parseStatus = (data) => {
|
||||||
return output
|
return output
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is for masto API only.
|
||||||
export const parseFollow = (data) => {
|
export const parseFollow = (data) => {
|
||||||
const output = {}
|
const output = {}
|
||||||
output.id = String(data.id)
|
output.id = String(data.id)
|
||||||
output.visibility = true
|
output.visibility = true
|
||||||
output.created_at = new Date(data.created_at)
|
output.created_at = new Date(data.created_at)
|
||||||
|
|
||||||
// Converting to string, the right way.
|
|
||||||
output.user = parseUser(data.account)
|
output.user = parseUser(data.account)
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
@ -273,8 +272,7 @@ export const parseNotification = (data) => {
|
||||||
|
|
||||||
if (masto) {
|
if (masto) {
|
||||||
output.type = mastoDict[data.type] || data.type
|
output.type = mastoDict[data.type] || data.type
|
||||||
|
// output.seen = ??? missing
|
||||||
output.seen = null // missing
|
|
||||||
output.status = output.type === 'follow'
|
output.status = output.type === 'follow'
|
||||||
? parseFollow(data)
|
? parseFollow(data)
|
||||||
: parseStatus(data.status)
|
: parseStatus(data.status)
|
||||||
|
|
Loading…
Reference in a new issue