mirror of
https://github.com/l5yth/potato-mesh.git
synced 2026-03-28 17:42:48 +01:00
Fix 1 after emojis in reply. (#464)
* Fix 1 after emojis in reply. * Refactor message reply handling for emojis and text * Fix reaction assertion in message-replies test --------- Co-authored-by: Alexkurd <gitmac@acl.one>
This commit is contained in:
@@ -100,5 +100,5 @@ test('buildMessageBody suppresses reaction slot markers and formats counts', ()
|
||||
renderEmojiHtml: value => `EMOJI(${value})`
|
||||
});
|
||||
|
||||
assert.equal(countedBody, 'ESC(×2) EMOJI(✨)');
|
||||
assert.equal(countedBody, 'EMOJI(✨)');
|
||||
});
|
||||
|
||||
@@ -360,7 +360,7 @@ export function buildMessageBody({ message, escapeHtml, renderEmojiHtml }) {
|
||||
const segments = [];
|
||||
const reaction = isReactionMessage(message);
|
||||
const textSegment = resolveMessageTextSegment(message, reaction);
|
||||
if (textSegment) {
|
||||
if (textSegment && !reaction) {
|
||||
segments.push(escapeHtml(textSegment));
|
||||
}
|
||||
const emoji = normaliseEmojiValue(message.emoji);
|
||||
|
||||
Reference in New Issue
Block a user