From 13e93dc46114cfb296984ca04c4ab361ed1aeae1 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Sat, 25 Nov 2023 03:52:14 +0100 Subject: [PATCH] [backend] [client] Import the proper userland punycode module --- packages/backend/src/misc/convert-host.ts | 6 +++--- packages/client/src/components/MkMention.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/misc/convert-host.ts b/packages/backend/src/misc/convert-host.ts index 95b6da539..949aced05 100644 --- a/packages/backend/src/misc/convert-host.ts +++ b/packages/backend/src/misc/convert-host.ts @@ -1,6 +1,6 @@ import { URL } from "node:url"; import config from "@/config/index.js"; -import { toASCII } from "punycode"; +import punycode from "punycode/"; export function getFullApAccount(username: string, host: string | null) { return host @@ -19,10 +19,10 @@ export function extractDbHost(uri: string) { } export function toPuny(host: string) { - return toASCII(host.toLowerCase()); + return punycode.toASCII(host.toLowerCase()); } export function toPunyNullable(host: string | null | undefined): string | null { if (host == null) return null; - return toASCII(host.toLowerCase()); + return punycode.toASCII(host.toLowerCase()); } diff --git a/packages/client/src/components/MkMention.vue b/packages/client/src/components/MkMention.vue index dbbe9ea49..d1f79dc00 100644 --- a/packages/client/src/components/MkMention.vue +++ b/packages/client/src/components/MkMention.vue @@ -34,7 +34,7 @@