feat: add EventComponent (system message) redesign#3007
Open
arnautov-anton wants to merge 1 commit intomasterfrom
Open
feat: add EventComponent (system message) redesign#3007arnautov-anton wants to merge 1 commit intomasterfrom
arnautov-anton wants to merge 1 commit intomasterfrom
Conversation
arnautov-anton
commented
Mar 12, 2026
Comment on lines
-68
to
-87
| if (event?.type === 'member.removed' || event?.type === 'member.added') { | ||
| const name = event.user?.name || event.user?.id; | ||
| const sentence = `${name} ${ | ||
| event.type === 'member.added' ? 'has joined the chat' : 'was removed from the chat' | ||
| }`; | ||
|
|
||
| return ( | ||
| <div className='str-chat__event-component__channel-event'> | ||
| <Avatar imageUrl={event.user?.image} size='md' userName={name} /> | ||
| <div className='str-chat__event-component__channel-event__content'> | ||
| <em className='str-chat__event-component__channel-event__sentence'> | ||
| {sentence} | ||
| </em> | ||
| <div className='str-chat__event-component__channel-event__date'> | ||
| {getDateString({ ...getDateOptions, format: 'LT' })} | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
This is dead code and apparently has been for a while - I couldn't get event object to appear in my message.
Contributor
There was a problem hiding this comment.
Yes this is dead code
|
Size Change: -443 B (-0.1%) Total Size: 433 kB
ℹ️ View Unchanged
|
arnautov-anton
commented
Mar 12, 2026
| data-unsafe-inner-html | ||
| /> | ||
| ) : ( | ||
| <span>{message.text}</span> |
Contributor
Author
There was a problem hiding this comment.
It's easier to just render text as adding/removing members does not provide useful information by default, mute/unmute does not return args (the user.id in question) nor enriched user object, that is being muted and finally ban/unban returns args but args also contain message so args look like "jane being naughty".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.