This is documentation for Stream Chat React Native SDK v4, which is nolonger actively maintained. For up-to-date documentation, see the latest version (v5).

MessageAction

When you long press a message, it opens up a message overlay and renders all the actions available on message. MessageAction is an object consisting of all the parameters required to render a single action button, in message overlay.

Example

{
  action: () => { /** Some action here */ },
  icon: <PinIcon />,
  title: 'Pin Message',
  titleStyle: { color: 'red' }
}

values

action

Callback when user presses the action button.

Type
Function

actionType

Type of the action performed.

Type
enum(‘blockUser’, ‘copyMessage’, ‘deleteMessage’, ‘editMessage’, ‘flagMessage’, ‘muteUser’, ‘pinMessage’, ‘selectReaction’, ‘reply’, ‘retry’, ‘quotedReply’, ‘threadReply’, ‘unpinMessage’)

icon

Element to render as icon for action button.

Type
Element

title

Title for action button.

Type
string

titleStyle

Styles for underlying Text component of action title.

© Getstream.io, Inc. All Rights Reserved.