forked from AkkomaGang/akkoma-fe
Set hide_follows and hide_followers settings when parsing Mastodon format
This commit is contained in:
parent
e80ed386be
commit
14ec12b4f6
2 changed files with 10 additions and 0 deletions
|
@ -70,6 +70,9 @@ export const parseUser = (data) => {
|
||||||
output.muted = relationship.muting
|
output.muted = relationship.muting
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output.hide_follows = data.pleroma.hide_follows
|
||||||
|
output.hide_followers = data.pleroma.hide_followers
|
||||||
|
|
||||||
output.rights = {
|
output.rights = {
|
||||||
moderator: data.pleroma.is_moderator,
|
moderator: data.pleroma.is_moderator,
|
||||||
admin: data.pleroma.is_admin
|
admin: data.pleroma.is_admin
|
||||||
|
|
|
@ -282,6 +282,13 @@ describe('API Entities normalizer', () => {
|
||||||
|
|
||||||
expect(parsedUser).to.have.property('description_html').that.contains('<img')
|
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
|
// We currently use QvitterAPI notifications only, and especially due to MastoAPI lacking is_seen, support for MastoAPI
|
||||||
|
|
Loading…
Reference in a new issue