useMessageOptions
Introduction
The useMessageOptions
hook is used to implement menu actions of an individual message object. It contains the functions for each of the available menu-options of message. You can use this to implement your menu options when creating a custom message UI. It returns the following.
Property | Type | Description | Optional |
---|---|---|---|
onReport | OneArgVoidReturns <{ id: string | number; reason: string | null; }> | Function to report a message with an ID and optional reason. | |
onDelete | ZeroArgVoidReturns | Function to delete a message. | |
onSetTopic | ZeroArgVoidReturns | Function to set a message as the topic. | |
onEdit | ZeroArgVoidReturns | Function to edit a message. | |
onReply | ZeroArgVoidReturns | Function to reply to a message. | |
putReaction | OneArgVoidReturns <string> | Function to add a reaction to a message. | |
onReplyPrivately | OneArgVoidReturns <string | number> | Function to reply privately to a message. |
Reference
For reference checkout this file