{
defaultHandler: [function],
emitter: 'giphy',
event: [Native Event Object],
actionHandlers: {
deleteMessage: [function],
editMessage: [function],
quotedReply: [function],
resendMessage: [function],
showMessageOverlay: [function],
toggleBanUser: [function],
toggleMuteUser: [function],
toggleReaction: [function],
},
message: [message object],
}
This is documentation for
Stream Chat React-native SDK v3, which is no longer actively maintained. For up-to-date documentation, see the latest version (v5).
MessageTouchableHandlerPayload
The MessageTouchableHandlerPayload
object is provided as a parameter to callback handlers such as onLongPressMessage
, onDoubleTapMessage
, onPressMessage
for user interaction with message.
Example
Keys and values
defaultHandler
Default handler function for corresponding interaction.
Type |
---|
function |
emitter
Location within message, where the interaction occurred.
Type |
---|
enum(‘card’, ‘fileAttachment’, ‘gallery’, ‘giphy’, ‘message’, ‘messageContent’, ‘messageReplies’, ‘reactionList’, ‘textLink’, ‘textMention’) |
event
Native event object which could either be coming from TouchableOpacity or react-native-gesture-handler
Type |
---|
object |
actionHandlers
Set of action handler functions for various message actions. You can use these functions to perform any action when give interaction occurs.
deleteMessage
editMessage
quotedReply
resendMessage
showMessageOverlay
toggleBanUser
toggleMuteUser
toggleReaction
(takes reactionType as a parameter)
<Channel onLongPressMessage={({ defaultHandlers }) => defaultHandlers.quotedReply()}
Type |
---|
object |
message
Message object, on which interaction occurred.
<Channel onLongPressMessage={({ message }) => console.log(message.id, message.text)}
Type |
---|
object |