From 46e4606c3408951b23ffec683e72131b43ec754e Mon Sep 17 00:00:00 2001 From: Geoff Lamperd Date: Fri, 12 Jul 2024 14:43:12 +1000 Subject: [PATCH] fix: handle username with hyphens --- packages/phase2cli/src/lib/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/phase2cli/src/lib/utils.ts b/packages/phase2cli/src/lib/utils.ts index 84476d1d..83d3763c 100644 --- a/packages/phase2cli/src/lib/utils.ts +++ b/packages/phase2cli/src/lib/utils.ts @@ -160,7 +160,7 @@ export const getUserHandleFromProviderUserId = (providerUserId: string): string return providerUserId } - return providerUserId.split("-")[0] + return providerUserId.substring(0, providerUserId.lastIndexOf("-")) } /**