MessageOverlayContext
MessageOverlayContext
is a context provided by OverlayProvider
, to provide values for message overlay. Message overlay shows up when user long presses a message.
Value
setData
Setter function for data.
Type |
---|
function |
data
This is an object with following keys:
alignment
{' '}
Sets if the message should be aligned to right or left side of list.
Type | Default |
---|---|
enum('right', 'left') | 'right' |
clientId
Id of the current user connected to the chat.
Type |
---|
string |
files
{' '}
Array of file
type attachments to be shown in the grouped UI component.
const files = message.attachments.filter(a => a.type === 'file');
Type |
---|
array |
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') |
handleReaction
{' '}
Function called when a reaction is selected in the message overlay, this is called on both the add and remove action. This function does not override the default behavior of the reaction being selected. Please refer to the guide on customizing message actions for details.
Type |
---|
function |
Parameter | Description |
---|---|
message | message the action is called on |
reactionType | string designating the type of reaction |
images
{' '}
Array of image
type attachments on message.
const images = message.attachments.filter(a => a.type === 'image');
Type |
---|
array |
message
{' '}
Message object
Type |
---|
object |
messageActions
{' '}
An array of, or function that returns and array of, actions that can be performed on a message shown in the message overlay. Please refer to the guide on customizing message actions for details.
Type | Default |
---|---|
array | function | messageActions |
Parameter | Description |
---|---|
actionInfo | an object containing the original actions and relevant message data |
messageReactionTitle
Title for MessageReactions
component.
Type | Default |
---|---|
string | "Message Reactions" |
messagesContext
Entire value object of MessagesContext
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 |
OverlayReactionList
{' '}
Reaction selector component displayed within the message overlay when user long presses a message.
Type | Default |
---|---|
component | OverlayReactionList |
supportedReactions
{' '}
List of reactions which can be added on message. Please refer to the guide on customizing reactions for details.
Type | Default |
---|---|
array | reactionData |
threadList
{' '}
True if current message is part of a message thread.
Type |
---|
boolean |
forwarded from OverlayProvider props OverlayReactionList
Reaction selector component displayed within the message overlay when user long presses a message.
Type | Default |
---|---|
component | OverlayReactionList |
forwarded from OverlayProvider props OverlayReactions
List of reactions component within the message overlay.
Type | Default |
---|---|
component | OverlayReactions |
forwarded from OverlayProvider props OverlayReactionsAvatar
Component for rendering a avatar in the message reaction overlay.
Type | Default |
---|---|
component | OverlayReactionsAvatar |