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:
parent
e80ed386be
commit
14ec12b4f6
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user