{t('Message_Ignored')}
diff --git a/apps/meteor/client/components/message/MessageContentBody.tsx b/apps/meteor/client/components/message/MessageContentBody.tsx
index 5552e6da0745..b3c612fbe725 100644
--- a/apps/meteor/client/components/message/MessageContentBody.tsx
+++ b/apps/meteor/client/components/message/MessageContentBody.tsx
@@ -1,5 +1,4 @@
-import { css } from '@rocket.chat/css-in-js';
-import { MessageBody, Box, Palette, Skeleton } from '@rocket.chat/fuselage';
+import { MessageBody, Skeleton } from '@rocket.chat/fuselage';
import { Markup } from '@rocket.chat/gazzodown';
import React, { Suspense } from 'react';
@@ -10,59 +9,14 @@ type MessageContentBodyProps = Pick {
- // TODO: this style should go to Fuselage repository
- const messageBodyAdditionalStyles = css`
- > blockquote {
- padding-inline: 8px;
- border: 1px solid ${Palette.stroke['stroke-extra-light']};
- border-radius: 2px;
- background-color: ${Palette.surface['surface-tint']};
- border-inline-start-color: ${Palette.stroke['stroke-medium']};
-
- &:hover,
- &:focus {
- background-color: ${Palette.surface['surface-hover']};
- border-color: ${Palette.stroke['stroke-light']};
- border-inline-start-color: ${Palette.stroke['stroke-medium']};
- }
- }
- > ul.task-list {
- > li::before {
- display: none;
- }
-
- > li > .rcx-check-box > .rcx-check-box__input:focus + .rcx-check-box__fake {
- z-index: 1;
- }
-
- list-style: none;
- margin-inline-start: 0;
- padding-inline-start: 0;
- }
- a {
- color: ${Palette.text['font-info']};
- &:hover {
- text-decoration: underline;
- }
- &:focus {
- box-shadow: 0 0 0 2px ${Palette.stroke['stroke-extra-light-highlight']};
- border-radius: 2px;
- }
- }
- `;
-
- return (
-
-
- }>
-
-
-
-
-
-
- );
-};
+const MessageContentBody = ({ mentions, channels, md, searchText }: MessageContentBodyProps) => (
+
+ }>
+
+
+
+
+
+);
export default MessageContentBody;
diff --git a/apps/meteor/client/components/message/MessageToolboxHolder.tsx b/apps/meteor/client/components/message/MessageToolbarHolder.tsx
similarity index 75%
rename from apps/meteor/client/components/message/MessageToolboxHolder.tsx
rename to apps/meteor/client/components/message/MessageToolbarHolder.tsx
index 06a9fbf42b77..4251660d0f9f 100644
--- a/apps/meteor/client/components/message/MessageToolboxHolder.tsx
+++ b/apps/meteor/client/components/message/MessageToolbarHolder.tsx
@@ -1,5 +1,5 @@
import type { IMessage } from '@rocket.chat/core-typings';
-import { MessageToolboxWrapper } from '@rocket.chat/fuselage';
+import { MessageToolbarWrapper } from '@rocket.chat/fuselage';
import { useQuery } from '@tanstack/react-query';
import type { ReactElement } from 'react';
import React, { Suspense, lazy, memo, useRef, useState } from 'react';
@@ -8,14 +8,14 @@ import type { MessageActionContext } from '../../../app/ui-utils/client/lib/Mess
import { useChat } from '../../views/room/contexts/ChatContext';
import { useIsVisible } from '../../views/room/hooks/useIsVisible';
-type MessageToolboxHolderProps = {
+type MessageToolbarHolderProps = {
message: IMessage;
context?: MessageActionContext;
};
-const MessageToolbox = lazy(() => import('./toolbox/MessageToolbox'));
+const MessageToolbar = lazy(() => import('./toolbar/MessageToolbar'));
-const MessageToolboxHolder = ({ message, context }: MessageToolboxHolderProps): ReactElement => {
+const MessageToolbarHolder = ({ message, context }: MessageToolbarHolderProps): ReactElement => {
const ref = useRef(null);
const [isVisible] = useIsVisible(ref);
@@ -35,10 +35,10 @@ const MessageToolboxHolder = ({ message, context }: MessageToolboxHolderProps):
});
return (
-
+
{showToolbox && depsQueryResult.isSuccess && depsQueryResult.data.room && (
-
)}
-
+
);
};
-export default memo(MessageToolboxHolder);
+export default memo(MessageToolbarHolder);
diff --git a/apps/meteor/client/components/message/content/Attachments.tsx b/apps/meteor/client/components/message/content/Attachments.tsx
index 2c1b6675cb7b..ea9c03b9e7d3 100644
--- a/apps/meteor/client/components/message/content/Attachments.tsx
+++ b/apps/meteor/client/components/message/content/Attachments.tsx
@@ -6,15 +6,14 @@ import AttachmentsItem from './attachments/AttachmentsItem';
type AttachmentsProps = {
attachments: MessageAttachmentBase[];
- collapsed?: boolean;
id?: string | undefined;
};
-const Attachments = ({ attachments, collapsed, id }: AttachmentsProps): ReactElement => {
+const Attachments = ({ attachments, id }: AttachmentsProps): ReactElement => {
return (
<>
{attachments?.map((attachment, index) => (
-
+
))}
>
);
diff --git a/apps/meteor/client/components/message/content/DiscussionMetrics.tsx b/apps/meteor/client/components/message/content/DiscussionMetrics.tsx
index 5589d1278905..dc84828e607a 100644
--- a/apps/meteor/client/components/message/content/DiscussionMetrics.tsx
+++ b/apps/meteor/client/components/message/content/DiscussionMetrics.tsx
@@ -23,7 +23,7 @@ const DiscussionMetrics = ({ lm, count, rid, drid }: DiscussionMetricsProps): Re
goToRoom(drid)}>
- {count ? t('message_counter', { counter: count, count }) : t('Reply')}
+ {count ? t('message_counter', { count }) : t('Reply')}
diff --git a/apps/meteor/client/components/message/content/Reactions.tsx b/apps/meteor/client/components/message/content/Reactions.tsx
index 712504ec7a2c..5f2e82b6b742 100644
--- a/apps/meteor/client/components/message/content/Reactions.tsx
+++ b/apps/meteor/client/components/message/content/Reactions.tsx
@@ -1,9 +1,9 @@
import type { IMessage } from '@rocket.chat/core-typings';
import { MessageReactions, MessageReactionAction } from '@rocket.chat/fuselage';
import type { ReactElement } from 'react';
-import React from 'react';
+import React, { useContext } from 'react';
-import { useOpenEmojiPicker, useReactionsFilter, useUserHasReacted } from '../list/MessageListContext';
+import { MessageListContext, useOpenEmojiPicker, useUserHasReacted } from '../list/MessageListContext';
import Reaction from './reactions/Reaction';
import { useToggleReactionMutation } from './reactions/useToggleReactionMutation';
@@ -13,9 +13,8 @@ type ReactionsProps = {
const Reactions = ({ message }: ReactionsProps): ReactElement => {
const hasReacted = useUserHasReacted(message);
- const filterReactions = useReactionsFilter(message);
const openEmojiPicker = useOpenEmojiPicker(message);
-
+ const { username } = useContext(MessageListContext);
const toggleReactionMutation = useToggleReactionMutation();
return (
@@ -27,7 +26,8 @@ const Reactions = ({ message }: ReactionsProps): ReactElement => {
counter={reactions.usernames.length}
hasReacted={hasReacted}
name={name}
- names={filterReactions(name)}
+ names={reactions.usernames.filter((user) => user !== username)}
+ messageId={message._id}
onClick={() => toggleReactionMutation.mutate({ mid: message._id, reaction: name })}
/>
))}
diff --git a/apps/meteor/client/components/message/content/attachments/AttachmentsItem.tsx b/apps/meteor/client/components/message/content/attachments/AttachmentsItem.tsx
index 589549d4bcc1..dd4f9bac9d28 100644
--- a/apps/meteor/client/components/message/content/attachments/AttachmentsItem.tsx
+++ b/apps/meteor/client/components/message/content/attachments/AttachmentsItem.tsx
@@ -4,7 +4,7 @@ import type { ReactElement } from 'react';
import React, { memo } from 'react';
import DefaultAttachment from './DefaultAttachment';
-import { FileAttachment } from './FileAttachment';
+import FileAttachment from './FileAttachment';
import { QuoteAttachment } from './QuoteAttachment';
type AttachmentsItemProps = {
diff --git a/apps/meteor/client/components/message/content/attachments/FileAttachment.tsx b/apps/meteor/client/components/message/content/attachments/FileAttachment.tsx
index 942ace9055d3..f80fa62890ec 100644
--- a/apps/meteor/client/components/message/content/attachments/FileAttachment.tsx
+++ b/apps/meteor/client/components/message/content/attachments/FileAttachment.tsx
@@ -1,23 +1,25 @@
-import type { FileAttachmentProps } from '@rocket.chat/core-typings';
-import { isFileAudioAttachment, isFileImageAttachment, isFileVideoAttachment } from '@rocket.chat/core-typings';
-import type { FC } from 'react';
+import { type FileAttachmentProps, isFileAudioAttachment, isFileImageAttachment, isFileVideoAttachment } from '@rocket.chat/core-typings';
import React from 'react';
-import { AudioAttachment } from './file/AudioAttachment';
-import { GenericFileAttachment } from './file/GenericFileAttachment';
-import { ImageAttachment } from './file/ImageAttachment';
-import { VideoAttachment } from './file/VideoAttachment';
+import AudioAttachment from './file/AudioAttachment';
+import GenericFileAttachment from './file/GenericFileAttachment';
+import ImageAttachment from './file/ImageAttachment';
+import VideoAttachment from './file/VideoAttachment';
-export const FileAttachment: FC = (attachment) => {
+const FileAttachment = (attachment: FileAttachmentProps) => {
if (isFileImageAttachment(attachment)) {
return ;
}
+
if (isFileAudioAttachment(attachment)) {
return ;
}
+
if (isFileVideoAttachment(attachment)) {
return ;
}
- return ; // TODO: fix this
+ return ;
};
+
+export default FileAttachment;
diff --git a/apps/meteor/client/components/message/content/attachments/QuoteAttachment.tsx b/apps/meteor/client/components/message/content/attachments/QuoteAttachment.tsx
index 67232cbd441f..7c2c2011cac9 100644
--- a/apps/meteor/client/components/message/content/attachments/QuoteAttachment.tsx
+++ b/apps/meteor/client/components/message/content/attachments/QuoteAttachment.tsx
@@ -1,6 +1,7 @@
import type { MessageQuoteAttachment } from '@rocket.chat/core-typings';
import { css } from '@rocket.chat/css-in-js';
import { Box, Palette } from '@rocket.chat/fuselage';
+import { useUserPreference } from '@rocket.chat/ui-contexts';
import type { ReactElement } from 'react';
import React from 'react';
@@ -37,6 +38,7 @@ type QuoteAttachmentProps = {
export const QuoteAttachment = ({ attachment }: QuoteAttachmentProps): ReactElement => {
const formatTime = useTimeAgo();
+ const displayAvatarPreference = useUserPreference('displayAvatars');
return (
<>
@@ -50,7 +52,7 @@ export const QuoteAttachment = ({ attachment }: QuoteAttachmentProps): ReactElem
borderInlineStartColor='light'
>
-
+ {displayAvatarPreference && }
@@ -68,7 +70,7 @@ export const QuoteAttachment = ({ attachment }: QuoteAttachmentProps): ReactElem
{attachment.md ? : attachment.text.substring(attachment.text.indexOf('\n') + 1)}
{attachment.attachments && (
-
+
)}
diff --git a/apps/meteor/client/components/message/content/attachments/default/ActionAttachtment.tsx b/apps/meteor/client/components/message/content/attachments/default/ActionAttachtment.tsx
index df3b2674b897..99b1f3de7290 100644
--- a/apps/meteor/client/components/message/content/attachments/default/ActionAttachtment.tsx
+++ b/apps/meteor/client/components/message/content/attachments/default/ActionAttachtment.tsx
@@ -10,27 +10,29 @@ export const ActionAttachment: FC = ({ actions }) => {
const handleLinkClick = useExternalLink();
return (
-
- {actions
- .filter(
- ({ type, msg_in_chat_window: msgInChatWindow, url, image_url: image, text }) =>
- type === 'button' && (image || text) && (url || msgInChatWindow),
- )
- .map(({ text, url, msgId, msg, msg_processing_type: processingType = 'sendMessage', image_url: image }, index) => {
- const content = image ? : text;
- if (url) {
+
+
+ {actions
+ .filter(
+ ({ type, msg_in_chat_window: msgInChatWindow, url, image_url: image, text }) =>
+ type === 'button' && (image || text) && (url || msgInChatWindow),
+ )
+ .map(({ text, url, msgId, msg, msg_processing_type: processingType = 'sendMessage', image_url: image }, index) => {
+ const content = image ? : text;
+ if (url) {
+ return (
+
+ );
+ }
return (
-
+
);
- }
- return (
-
- {content}
-
- );
- })}
-
+ })}
+
+
);
};
diff --git a/apps/meteor/client/components/message/content/attachments/file/AudioAttachment.tsx b/apps/meteor/client/components/message/content/attachments/file/AudioAttachment.tsx
index 4dd06de46655..0f2082f96e31 100644
--- a/apps/meteor/client/components/message/content/attachments/file/AudioAttachment.tsx
+++ b/apps/meteor/client/components/message/content/attachments/file/AudioAttachment.tsx
@@ -1,14 +1,13 @@
import type { AudioAttachmentProps } from '@rocket.chat/core-typings';
import { AudioPlayer } from '@rocket.chat/fuselage';
import { useMediaUrl } from '@rocket.chat/ui-contexts';
-import type { FC } from 'react';
import React from 'react';
import MarkdownText from '../../../../MarkdownText';
import MessageCollapsible from '../../../MessageCollapsible';
import MessageContentBody from '../../../MessageContentBody';
-export const AudioAttachment: FC