MessageSystem
Renders system type messages inside MessageList. This is the default component for the MessageSystem prop.
System messages inform users about channel changes. They are part of message history and use type: "system". Common scenarios:
- A user gets added to or removed from channel
- A user accepts invite to join a channel
- Channel is updated
Best Practices
- Keep system messages distinct but unobtrusive.
- Use
formatDateto keep timestamps consistent with other messages. - Avoid mixing system messages with user content styling.
- Don’t allow reactions or edits on system messages.
- Ensure system messages are localized where possible.
Props
formatDate
Format function for dates in message status and deleted message components.
| Type |
|---|
| function |
| Parameter | Description |
|---|---|
| date | date to format provided as a string, Date, or number (Unix Timestamp) |
message
Message object.
| Type |
|---|
Message type |