From 3e225aa6c684c9f34d1134e36cbe15f7e3393b39 Mon Sep 17 00:00:00 2001 From: Oleksii Bulenok Date: Mon, 17 Aug 2026 18:15:08 +0200 Subject: [PATCH] Truncate git alt text to 2000 symbols --- src/view/com/composer/GifAltText.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/view/com/composer/GifAltText.tsx b/src/view/com/composer/GifAltText.tsx index 35767a20ab..f7d990a734 100644 --- a/src/view/com/composer/GifAltText.tsx +++ b/src/view/com/composer/GifAltText.tsx @@ -10,6 +10,7 @@ import { type EmbedPlayerParams, parseEmbedPlayerFromUrl, } from '#/lib/strings/embed-player' +import {enforceLen} from '#/lib/strings/helpers' import {useResolveGifQuery} from '#/state/queries/resolve-link' import {AltTextCounterWrapper} from '#/view/com/composer/AltTextCounterWrapper' import {atoms as a, useTheme} from '#/alf' @@ -111,7 +112,7 @@ export function GifAltTextDialogLoaded({ { - onSubmit(altTextDraft) + onSubmit(enforceLen(altTextDraft, MAX_ALT_TEXT, true)) }} nativeOptions={{fullHeight: true}}>