From 645907851df56e36f500b119e735207d404456c7 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Mon, 25 Sep 2023 02:48:05 +0200 Subject: [PATCH] fix: text min length is 1 (thanks mk) --- packages/backend/src/server/api/mastodon/endpoints/status.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/status.ts b/packages/backend/src/server/api/mastodon/endpoints/status.ts index aae551b06..5764938c0 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/status.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/status.ts @@ -156,7 +156,7 @@ export class ApiStatusMastodon { ) { body = normalizeQuery(body); } - const text = body.status ? body.status : ''; + const text = body.status ? body.status : ' '; const removed = text.replace(/@\S+/g, '').replace(/\s|/g, ''); const isDefaultEmoji = emojiRegexAtStartToEnd.test(removed); const isCustomEmoji = /^:[a-zA-Z0-9@_]+:$/.test(removed);