useChatroomList
Introduction
The useChatroomList
hook provides you with the following return values. Use these to create your own custom view.
Property | Type | Description | Optional |
---|---|---|---|
groupChatroomsList | Chatroom[] \| null | List of group chatrooms. | ✔️ |
groupChatroomConversationsMeta | Record<string, Conversation> | Metadata for group chatroom conversations. | |
groupChatroomMember | Record<string, Member> | Members of the group chatrooms. | |
getChatroomsMine | ZeroArgVoidReturns | Fetches chatrooms owned by the user. | |
getExploreGroupChatrooms | ZeroArgVoidReturns | Fetches chatrooms available for exploration. | |
exploreGroupChatrooms | Chatroom[] | List of available group chatrooms. | |
loadMoreExploreGroupChatrooms | boolean | Indicates if more chatrooms can be loaded for exploration. | |
loadMoreGroupChatrooms | boolean | Indicates if more group chatrooms can be loaded. | |
joinAChatroom | OneArgVoidReturns<number> | Function to join a chatroom. | |
markReadAChatroom | OneArgVoidReturns<number> | Marks a chatroom as read. | |
onLeaveChatroom | OneArgVoidReturns<number> | Leaves a chatroom. | |
checkForDmTab | () => Promise<HideDMTabInfo \| null> | Checks if the DM tab should be hidden. | |
approveDMRequest | OneArgVoidReturns<string> | Approves a direct message request. | |
rejectDMRequest | OneArgVoidReturns<string> | Rejects a direct message request. | |
currentSelectedChatroomId | number \| undefined | The ID of the currently selected chatroom. | ✔️ |
selectNewChatroom | OneArgVoidReturns<number> | Function to select a new chatroom. |
Reference
For reference checkout this file