fix #1036 convert screen name to unicode with punycode

This commit is contained in:
Shpuld Shpludson 2021-01-05 08:09:08 +00:00
parent 9d45db959f
commit ef6e2087ae
5 changed files with 196 additions and 287 deletions

View file

@ -311,6 +311,12 @@ describe('API Entities normalizer', () => {
expect(parseUser(user)).to.have.property('hide_followers_count', false)
expect(parseUser(user)).to.have.property('hide_follows_count', true)
})
it('converts IDN to unicode and marks it as internatonal', () => {
const user = makeMockUserMasto({ acct: 'lain@xn--lin-6cd.com' })
expect(parseUser(user)).to.have.property('screen_name').that.equal('lain@🌏lаin.com')
})
})
// We currently use QvitterAPI notifications only, and especially due to MastoAPI lacking is_seen, support for MastoAPI