Skip to main content

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.

PropertyTypeDescriptionOptional
chatroomDetailsChatroomDetails \| nullDetails of the current chatroom.✔️
setChatroomReact.Dispatch<ChatroomDetails \| null>Function to update the chatroom details.
conversationToReplyConversation \| nullThe conversation the user is replying to.✔️
conversationToeditConversation \| nullThe conversation the user is editing.✔️
setConversationToReplyReact.Dispatch<Conversation \| null>Function to set the conversation to reply to.
setConversationToEditReact.Dispatch<Conversation \| null>Function to set the conversation to edit.
canUserReplyPrivatelyReplyDmQueriesDetermines if the user can reply privately.
searchedConversationIdnumber \| nullThe ID of the searched conversation.✔️
setSearchedConversationIdReact.Dispatch<number \| null>Function to set the searched conversation ID.

Reference

For reference checkout this file