mirror of
https://github.com/RocketChat/Rocket.Chat.git
synced 2025-12-28 06:47:25 +00:00
regression: fix reactions on federated rooms (#37173)
This commit is contained in:
parent
652d36021f
commit
5f41eef79d
@ -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}
|
||||
|
||||
@ -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(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user