Add status check.

This commit is contained in:
newt 2022-02-22 13:27:12 +00:00
parent 075d48b7f7
commit 93a87b5646

View file

@ -380,7 +380,9 @@ export const parseNotification = (data) => {
if (masto) { if (masto) {
output.type = mastoDict[data.type] || data.type output.type = mastoDict[data.type] || data.type
output.seen = data.pleroma.is_seen output.seen = data.pleroma.is_seen
output.status = isStatusNotification(output.type) ? parseStatus(data.status) : null // TODO: null check should be a temporary fix, I guess.
// Investigate why backend does this.
output.status = isStatusNotification(output.type) && data.status !== null ? parseStatus(data.status) : null
output.action = output.status // TODO: Refactor, this is unneeded output.action = output.status // TODO: Refactor, this is unneeded
output.target = output.type !== 'move' output.target = output.type !== 'move'
? null ? null