forked from AkkomaGang/akkoma-fe
More robust backwards compatibility
This commit is contained in:
parent
9656c9b969
commit
36e56354e4
1 changed files with 5 additions and 2 deletions
|
@ -188,9 +188,12 @@ export const parseUser = (data) => {
|
||||||
output.follow_request_count = data.pleroma.follow_request_count
|
output.follow_request_count = data.pleroma.follow_request_count
|
||||||
|
|
||||||
output.tags = data.pleroma.tags
|
output.tags = data.pleroma.tags
|
||||||
|
|
||||||
// deactivated was changed to is_active in Pleroma 2.3.0
|
// deactivated was changed to is_active in Pleroma 2.3.0
|
||||||
// backwards compatability kept for now
|
// so check if is_active is present
|
||||||
output.deactivated = data.pleroma.deactivated ? !data.pleroma.is_active : data.pleroma.deactivated
|
output.deactivated = typeof data.pleroma.is_active !== undefined
|
||||||
|
? !data.pleroma.is_active // new backend
|
||||||
|
: data.pleroma.deactivated // old backend
|
||||||
|
|
||||||
output.notification_settings = data.pleroma.notification_settings
|
output.notification_settings = data.pleroma.notification_settings
|
||||||
output.unread_chat_count = data.pleroma.unread_chat_count
|
output.unread_chat_count = data.pleroma.unread_chat_count
|
||||||
|
|
Loading…
Reference in a new issue