From ef5c31fff713eb2c71578b6d29047e7a3c479676 Mon Sep 17 00:00:00 2001 From: Felicio Mununga Date: Thu, 9 May 2024 18:25:56 +0200 Subject: [PATCH] trim whitespace of encoded emoji (#559) * trim whitespace of encoded emoji * Create eighty-crabs-accept.md --- .changeset/eighty-crabs-accept.md | 5 +++++ packages/status-js/src/utils/encode-url-data.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/eighty-crabs-accept.md diff --git a/.changeset/eighty-crabs-accept.md b/.changeset/eighty-crabs-accept.md new file mode 100644 index 00000000..4a2008d1 --- /dev/null +++ b/.changeset/eighty-crabs-accept.md @@ -0,0 +1,5 @@ +--- +"@status-im/js": patch +--- + +trim whitespace of encoded emoji diff --git a/packages/status-js/src/utils/encode-url-data.ts b/packages/status-js/src/utils/encode-url-data.ts index 050320a0..e60a924a 100644 --- a/packages/status-js/src/utils/encode-url-data.ts +++ b/packages/status-js/src/utils/encode-url-data.ts @@ -36,7 +36,7 @@ export function decodeCommunityURLData(data: string) { const channelSchema = z.object({ displayName: z.string().max(24).nonempty(), description: z.string().max(140).nonempty(), - emoji: z.string().emoji().optional(), + emoji: z.string().trim().emoji().optional(), color: colorSchema, community: z.object({ displayName: communityDisplayName,