The 1st decentralized social network for sharing when you're on the toilet. Post a "flush" today! Powered by the AT Protocol.

fix emoji parsing

dame-is b5f8f603 ee79d8df

+4 -1
+4 -1
src/lib/api-client.ts
··· 35 35 '😣', '🤢', '🤮', '🥴', '😮‍💨', '😳', '😵', '🌾', '🍦', '📱', '📖', '💭', 36 36 '1️⃣', '2️⃣', '🟡', '🟤']; 37 37 38 + // Sort emojis by length (longest first) to handle compound emojis correctly 39 + const sortedEmojis = [...toiletEmojis].sort((a, b) => b.length - a.length); 40 + 38 41 // Look for any of these emojis in the text 39 - for (const testEmoji of toiletEmojis) { 42 + for (const testEmoji of sortedEmojis) { 40 43 if (options.text.includes(testEmoji)) { 41 44 emoji = testEmoji; 42 45 cleanText = options.text.replace(testEmoji, '').trim();