Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 4c230f7

Browse files
tulirsumnerevans
authored andcommitted
Include custom reaction short names in tooltips
1 parent d4ea509 commit 4c230f7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/views/messages/ReactionsRowButtonTooltip.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,16 @@ export default class ReactionsRowButtonTooltip extends React.PureComponent<IProp
4343
let tooltipLabel: JSX.Element | undefined;
4444
if (room) {
4545
const senders: string[] = [];
46+
let customReactionName = '';
4647
for (const reactionEvent of reactionEvents) {
4748
const member = room.getMember(reactionEvent.getSender()!);
4849
const name = member?.name ?? reactionEvent.getSender()!;
4950
senders.push(name);
51+
if (reactionEvent.event.content?.["com.beeper.reaction.shortcode"]) {
52+
customReactionName = reactionEvent.event.content?.["com.beeper.reaction.shortcode"];
53+
}
5054
}
51-
const shortName = unicodeToShortcode(content);
55+
const shortName = unicodeToShortcode(content) || customReactionName;
5256
tooltipLabel = (
5357
<div>
5458
{_t(

0 commit comments

Comments
 (0)