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:
Alexkurd
2025-11-19 22:34:52 +03:00
committed by GitHub
parent eab6af414f
commit 5c2c2646cc
2 changed files with 2 additions and 2 deletions

View File

@@ -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(✨)');
});

View File

@@ -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);