1
0
mirror of https://git.pleroma.social/sjw/pleroma-fe.git synced 2024-12-23 16:25:06 +01:00

Set hide_follows and hide_followers settings when parsing Mastodon format

This commit is contained in:
Eugenij 2019-07-07 10:20:55 +00:00 committed by Shpuld Shpludson
parent e80ed386be
commit 14ec12b4f6
2 changed files with 10 additions and 0 deletions

View File

@ -70,6 +70,9 @@ export const parseUser = (data) => {
output.muted = relationship.muting
}
output.hide_follows = data.pleroma.hide_follows
output.hide_followers = data.pleroma.hide_followers
output.rights = {
moderator: data.pleroma.is_moderator,
admin: data.pleroma.is_admin

View File

@ -282,6 +282,13 @@ describe('API Entities normalizer', () => {
expect(parsedUser).to.have.property('description_html').that.contains('<img')
})
it('adds hide_follows and hide_followers user settings', () => {
const user = makeMockUserMasto({ pleroma: { hide_followers: true, hide_follows: false } })
expect(parseUser(user)).to.have.property('hide_followers', true)
expect(parseUser(user)).to.have.property('hide_follows', false)
})
})
// We currently use QvitterAPI notifications only, and especially due to MastoAPI lacking is_seen, support for MastoAPI