aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2021-01-18 15:54:12 -0600
committerMark Felder <feld@feld.me>2021-01-18 15:54:12 -0600
commit9656c9b96919f17647adda80ba187a4f5b2299e1 (patch)
tree3a07a442d08f88b6287aafc27c7c79d7af345645 /src
parentfe78ed78fdc95bb5dac4d11136673da4e5e57f4b (diff)
Support old user.deactivated and new user.is_active fields
Diffstat (limited to 'src')
-rw-r--r--src/services/entity_normalizer/entity_normalizer.service.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
index 625f593e..a199ebd0 100644
--- a/src/services/entity_normalizer/entity_normalizer.service.js
+++ b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -188,7 +188,9 @@ 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
+ // backwards compatability kept for now
+ output.deactivated = data.pleroma.deactivated ? !data.pleroma.is_active : data.pleroma.deactivated
output.notification_settings = data.pleroma.notification_settings
output.unread_chat_count = data.pleroma.unread_chat_count