Skip to content

Commit

Permalink
fix: imported fixes (#32815)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Jul 18, 2024
1 parent 1ae7b59 commit 91947da
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 30 deletions.
5 changes: 5 additions & 0 deletions .changeset/violet-brooms-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)
1 change: 0 additions & 1 deletion apps/meteor/app/discussion/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
// Other UI extensions
import './lib/messageTypes/discussionMessage';
import './createDiscussionMessageAction';

This file was deleted.

2 changes: 0 additions & 2 deletions apps/meteor/app/ui-utils/lib/MessageTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ export type MessageType = {
id: MessageTypesValues;
system?: boolean;
/* deprecated */
render?: (message: IMessage) => string;
/* deprecated */
template?: (message: IMessage) => unknown;
message: TranslationKey;
data?: (message: IMessage) => Record<string, string>;
Expand Down
3 changes: 0 additions & 3 deletions apps/meteor/app/ui-utils/server/Message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ export const Message = {
parse(msg: IMessage, language: string) {
const messageType = MessageTypes.getType(msg);
if (messageType) {
if (messageType.render) {
return messageType.render(msg);
}
if (messageType.template) {
// Render message
return;
Expand Down
11 changes: 3 additions & 8 deletions apps/meteor/client/components/message/variants/SystemMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,9 @@ const SystemMessage = ({ message, showUserAvatar, ...props }: SystemMessageProps
{showUsername && <MessageUsername data-username={user.username}>@{user.username}</MessageUsername>}
</MessageNameContainer>
{messageType && (
<MessageSystemBody
data-qa-type='system-message-body'
dangerouslySetInnerHTML={{
__html: messageType.render
? messageType.render(message)
: t(messageType.message, messageType.data ? messageType.data(message) : {}),
}}
/>
<MessageSystemBody data-qa-type='system-message-body'>
{t(messageType.message, messageType.data ? messageType.data(message) : {})}
</MessageSystemBody>
)}
<MessageSystemTimestamp title={formatDateAndTime(message.ts)}>{formatTime(message.ts)}</MessageSystemTimestamp>
</MessageSystemBlock>
Expand Down

0 comments on commit 91947da

Please sign in to comment.