fix: prevent nesting of formatted text reactions

Usage of map was causing issues if the text reaction had special
characters.

Closes #205
This commit is contained in:
talksik
2026-05-17 16:51:37 -07:00
parent 4b468ed1ae
commit 2492188c50
4 changed files with 48 additions and 14 deletions
@@ -33,6 +33,7 @@ import Animated, {
import { REACTION_EMOJIS, type Reactions } from "@/api/types";
import type { Human } from "@/api/types";
import { resolveHumanDisplay } from "@/lib/humans";
import { sanitizeReactionText } from "@/lib/firestore-particles";
import { cn } from "@/lib/utils";
import { useSuspendPlayback } from "@/hooks/use-suspend-playback";
@@ -327,7 +328,9 @@ export function ReactionSheet({
<View className="flex-1 bg-white/10 rounded-full px-4 py-2.5">
<TextInput
value={text}
onChangeText={(v) => setText(v.slice(0, TEXT_REACTION_MAX))}
onChangeText={(v) =>
setText(sanitizeReactionText(v).slice(0, TEXT_REACTION_MAX))
}
placeholder="Send a quick reply..."
placeholderTextColor="rgba(255,255,255,0.4)"
maxLength={TEXT_REACTION_MAX}