tangled
alpha
login
or
join now
xan.lol
/
flushes.app
forked from
atpota.to/flushes.app
0
fork
atom
The 1st decentralized social network for sharing when you're on the toilet. Post a "flush" today! Powered by the AT Protocol.
0
fork
atom
overview
issues
pulls
pipelines
fix emoji parsing
dame-is
6 months ago
b5f8f603
ee79d8df
+4
-1
1 changed file
expand all
collapse all
unified
split
src
lib
api-client.ts
+4
-1
src/lib/api-client.ts
···
35
35
'😣', '🤢', '🤮', '🥴', '😮💨', '😳', '😵', '🌾', '🍦', '📱', '📖', '💭',
36
36
'1️⃣', '2️⃣', '🟡', '🟤'];
37
37
38
38
+
// Sort emojis by length (longest first) to handle compound emojis correctly
39
39
+
const sortedEmojis = [...toiletEmojis].sort((a, b) => b.length - a.length);
40
40
+
38
41
// Look for any of these emojis in the text
39
39
-
for (const testEmoji of toiletEmojis) {
42
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();