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:

Best Practices

  • Keep system messages distinct but unobtrusive.
  • Use formatDate to 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
ParameterDescription
datedate to format provided as a string, Date, or number (Unix Timestamp)

message

Message object.

Type
Message type