aboutsummaryrefslogtreecommitdiff
path: root/src/services/entity_normalizer
diff options
context:
space:
mode:
authorShpuld Shpuldson <shp@cock.li>2021-01-27 13:24:19 +0200
committerShpuld Shpuldson <shp@cock.li>2021-01-27 13:24:19 +0200
commit8334649c1137264f2987295847144fb1799e71c6 (patch)
tree979e2d1033061aef176a097a22cab350498a9df2 /src/services/entity_normalizer
parent54def7d210f9cf5fcebe6348d8ac33601325fe9a (diff)
parent11963de2887cbc1eed37887745cefc5eaeb2c126 (diff)
Merge branch 'develop' into feat/report-notification
Diffstat (limited to 'src/services/entity_normalizer')
-rw-r--r--src/services/entity_normalizer/entity_normalizer.service.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
index 53a3562a..00021ce0 100644
--- a/src/services/entity_normalizer/entity_normalizer.service.js
+++ b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -188,7 +188,12 @@ export const parseUser = (data) => {
output.follow_request_count = data.pleroma.follow_request_count
output.tags = data.pleroma.tags
- output.deactivated = data.pleroma.deactivated
+
+ // deactivated was changed to is_active in Pleroma 2.3.0
+ // so check if is_active is present
+ 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.unread_chat_count = data.pleroma.unread_chat_count