regression: fix reactions on federated rooms (#37173)

This commit is contained in:
Júlia Jaeger Foresti 2025-10-09 18:28:54 -03:00 committed by GitHub
parent 652d36021f
commit 5f41eef79d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,8 @@ import ReactionTooltip from './ReactionTooltip';
import { getEmojiClassNameAndDataTitle } from '../../../../lib/utils/renderEmoji';
import { MessageListContext } from '../../list/MessageListContext';
const normalizeUsernames = (names: string[]) => names.map((name) => (name.startsWith('@') ? name.slice(1) : name));
// TODO: replace it with proper usage of i18next plurals
type ReactionProps = {
hasReacted: (name: string) => boolean;
@ -47,7 +49,7 @@ const Reaction = ({ hasReacted, counter, name, names, messageId, onClick, ...pro
openTooltip(
<ReactionTooltip
emojiName={name}
usernames={names}
usernames={normalizeUsernames(names)}
mine={mine}
messageId={messageId}
showRealName={showRealName}

View File

@ -15,7 +15,7 @@ export const useShowMessageReactionsAction = (message: IMessage): MessageActionC
id: 'reaction-list',
icon: 'emoji',
label: 'Reactions',
context: ['message', 'message-mobile', 'threads', 'videoconf', 'videoconf-threads'],
context: ['message', 'message-mobile', 'threads', 'videoconf', 'videoconf-threads', 'federated'],
type: 'interaction',
action() {
setModal(