From 9dfc4dbf02e4e6185134cc26729c6e43d304140e Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Sun, 24 Sep 2023 00:39:33 +0200 Subject: [PATCH] fix: converter returning sharkeyid wrong --- packages/backend/src/server/api/mastodon/converters.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/mastodon/converters.ts b/packages/backend/src/server/api/mastodon/converters.ts index 94b70230d..a4429af67 100644 --- a/packages/backend/src/server/api/mastodon/converters.ts +++ b/packages/backend/src/server/api/mastodon/converters.ts @@ -26,7 +26,8 @@ export function convertId(in_id: string, id_convert_type: IdConvertType): string outStr = charFromNum(remainder) + outStr; input /= BigInt(36); } - return outStr; + let ReversedoutStr = outStr.split("").reduce((acc, char) => char + acc, ""); + return ReversedoutStr; default: throw new Error('Invalid ID conversion type');