useChatroom
Introduction
The useChatroom hook is responsible for setting the current chatroom context along with other chatroom utilities. You can pass an optional chatroomId to set an initial chatroom.
| Property | Type | Description | Optional |
|---|---|---|---|
chatroomDetails | ChatroomDetails \| null | Details of the current chatroom. | ✔️ |
setChatroom | React.Dispatch<ChatroomDetails \| null> | Function to update the chatroom details. | |
conversationToReply | Conversation \| null | The conversation the user is replying to. | ✔️ |
conversationToedit | Conversation \| null | The conversation the user is editing. | ✔️ |
setConversationToReply | React.Dispatch<Conversation \| null> | Function to set the conversation to reply to. | |
setConversationToEdit | React.Dispatch<Conversation \| null> | Function to set the conversation to edit. | |
canUserReplyPrivately | ReplyDmQueries | Determines if the user can reply privately. | |
searchedConversationId | number \| null | The ID of the searched conversation. | ✔️ |
setSearchedConversationId | React.Dispatch<number \| null> | Function to set the searched conversation ID. |
Reference
For reference checkout this file