Record<
string, // userId
{
banned?: boolean;
created_at?: string;
invite_accepted_at?: string;
invite_rejected_at?: string;
invited?: boolean;
is_moderator?: boolean;
role?: string;
shadow_banned?: boolean;
updated_at?: string;
user?: UserResponse<UserType>;
user_id?: string;
}
>;
MessageSimple
Component to render a message within the MessageList
. This component has been well optimized to save un-necessary re-renderings.
This is the default component provided to the prop MessageSimple
on the Channel
component.
Props
alignment
Sets if the message should be aligned to right or left side of list.
Type | Default |
---|---|
enum(‘right’, ‘left’) | ‘right’ |
channel
Channel instance from the StreamChat client.
Type |
---|
Channel |
enableMessageGroupingByUser
Note: This prop is available only in SDK version >= v3.9.0
If false, consecutive messages from same user won’t be grouped together.
Type | Default |
---|---|
boolean | true |
groupStyles
Position of message in the group. A message group is a group of consecutive messages from the same user. groupStyles
can be used to style the message as per their position in message group.
For example, user avatar (to which message belongs to) is only showed for last (bottom) message in group.
Type |
---|
array of enum(‘top’, ‘bottom’, ‘middle’, ‘single’) |
hasReactions
True if the message has at least 1 reaction.
Type |
---|
boolean |
isMyMessage
True if the message is sent by current user (connected to chat).
Type |
---|
boolean |
lastGroupMessage
Whether or not this is the last message in a group of messages.
Type |
---|
boolean |
members
Members of current channel. This value is received from backend when you query a channel, either using client.queryChannels()
or channel.watch()
API call.
client.queryChannels()
or channel.watch()
returns only up to 100 members of channel. So if you expect total number of members to be > 100, its better to use client.queryMembers()
API endpoint separately to get the list of members.
Type |
---|
object |
message
Message object.
Type |
---|
Message type |
onlyEmojis
True if the message text only contains emojis and nothing else.
Type |
---|
Boolean |
otherAttachments
All the attachments on the message except for types file
and image
.
Type |
---|
Array |
showMessageStatus
When false, message status (read receipt, pending state indicator) won’t be rendered. By default, this value is true for messages sent by current user of chat.
Type |
---|
boolean |
MyMessageTheme
Theme applied to messages of the current user.
Type |
---|
object |
Please make sure to memoize or pass static reference for this object.
UI Component Props
MessageAvatar
Component to render avatar of sender for message, within MessageList
. This component is only rendered for messages from other users.
Type | Default |
---|---|
ComponentType | MessageAvatar |
MessageContent
Component to render content of message including status, attachments, reactions etc., within MessageList
.
Type | Default |
---|---|
ComponentType | MessageContent |
MessageDeleted
Component to render deleted message.
Type | Default |
---|---|
ComponentType | MessageDeleted |
MessageFooter
Component to render footer for message, within MessageList
.
Type | Default |
---|---|
ComponentType | MessageFooter |
MessageHeader
Component to render header for message, within MessageList
.
Type |
---|
ComponentType |
MessagePinnedHeader
Component to render pinned message label for message, within MessageList
.
Type |
---|
ComponentType |
MessageReplies
Component to show number of thread replies and avatars of members who replied on message
Type | Default |
---|---|
ComponentType | MessageReplies |
MessageStatus
Component to render status of message, which includes time and read-receipts.
Type | Default |
---|---|
ComponentType | MessageStatus |
ReactionListBottom
Component to render list of reactions at the bottom of the message bubble.
Type | Default |
---|---|
ComponentType | ReactionListBottom |
ReactionListPosition
The position of the reaction list in the message component. By default, the reaction list is positioned on top the message content.
Type | Default value |
---|---|
top | bottom | ’top’ |
ReactionListTop
Component to render list of reactions at top of the message bubble.
Type | Default |
---|---|
ComponentType | ReactionListTop |