logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: f614da2abb0f89d4a27474d7287f62968f8b3c56
parent e14917e28daa3ddf2ae54d40ec11f718170dba03
Author: feld <feld@feld.me>
Date:   Wed, 20 Jan 2021 22:49:42 +0000

Merge branch 'breaking/adminapi-user-deactivated' into 'develop'

Support old user.deactivated and new user.is_active fields

See merge request pleroma/pleroma-fe!1329

Diffstat:

Msrc/services/entity_normalizer/entity_normalizer.service.js7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 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