From 63fa244ea86f692903f06c0e96529af3cc1b7e3e Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Sat, 10 Feb 2024 15:52:48 +0100 Subject: [PATCH] [client] Fix migration page when migrating from/to the same account twice, resolves #514 --- packages/client/src/pages/settings/migration.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/client/src/pages/settings/migration.vue b/packages/client/src/pages/settings/migration.vue index d33616f51..d3e2ff8af 100644 --- a/packages/client/src/pages/settings/migration.vue +++ b/packages/client/src/pages/settings/migration.vue @@ -60,6 +60,7 @@ import { i18n } from "@/i18n"; import { definePageMetadata } from "@/scripts/page-metadata"; import { $i } from "@/account"; import { toString } from "iceshrimp-js/built/acct"; +import { unique } from "@/scripts/array.js"; let moveToAccount = $ref(""); let accountAlias = $ref([""]); @@ -68,7 +69,7 @@ await init(); async function init() { if ($i?.alsoKnownAs && $i.alsoKnownAs.length > 0) { - const aka = await os.api("users/show", { userIds: $i.alsoKnownAs }); + const aka = await os.api("users/show", { userIds: unique($i.alsoKnownAs) }); accountAlias = aka && aka.length > 0 ? aka.map((user) => `@${toString(user)}`)