Fix punycode deprecation warning (#7426)

This commit is contained in:
MeiMei 2021-04-04 13:00:39 +09:00 committed by GitHub
parent 1f4ae2f63a
commit 7d2126e2b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 20 additions and 14 deletions

View file

@ -1,6 +1,6 @@
import { URL } from 'url';
import config from '@/config';
import { toASCII } from 'punycode';
import { toASCII } from 'punycode/';
export function getFullApAccount(username: string, host: string | null) {
return host ? `${username}@${toPuny(host)}` : `${username}@${toPuny(config.host)}`;