Skip to content

Commit

Permalink
fix: user action messages (RocketChat#746)
Browse files Browse the repository at this point in the history
* fix: user action messages

* remove showUsername
  • Loading branch information
abirc8010 authored and SinghaAnirban005 committed Jan 1, 2025
1 parent 60567a0 commit 6be799e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/react/src/views/Message/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ const Message = ({
isPinned={isPinned}
/>
)}
<MessageBodyContainer variantStyles={variantStyles}>
<MessageBodyContainer
variantStyles={variantStyles}
style={{ maxWidth: message?.t ? '90%' : null }}
>
{shouldShowHeader && (
<MessageHeader
message={message}
Expand Down
12 changes: 12 additions & 0 deletions packages/react/src/views/Message/MessageHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ const MessageHeader = ({
return 'unarchived room';
case 'room-allowed-reacting':
return 'allowed reactions';
case 'room_changed_announcement':
return `changed announcement to: ${
message?.msg && message.msg.length > 0 ? message.msg : '(none)'
}`;
case 'room_changed_description':
return `changed description to: ${
message?.msg && message.msg.length > 0 ? message.msg : '(none)'
}`;
case 'room_changed_topic':
return `changed topic to: ${
message?.msg && message.msg.length > 0 ? message.msg : '(none)'
}`;
default:
return '';
}
Expand Down

0 comments on commit 6be799e

Please sign in to comment.