Skip to main content

useChatroomList

Introduction

The useChatroomList hook provides you with the following return values. Use these to create your own custom view.

PropertyTypeDescriptionOptional
groupChatroomsListChatroom[] \| nullList of group chatrooms.✔️
groupChatroomConversationsMetaRecord<string, Conversation>Metadata for group chatroom conversations.
groupChatroomMemberRecord<string, Member>Members of the group chatrooms.
getChatroomsMineZeroArgVoidReturnsFetches chatrooms owned by the user.
getExploreGroupChatroomsZeroArgVoidReturnsFetches chatrooms available for exploration.
exploreGroupChatroomsChatroom[]List of available group chatrooms.
loadMoreExploreGroupChatroomsbooleanIndicates if more chatrooms can be loaded for exploration.
loadMoreGroupChatroomsbooleanIndicates if more group chatrooms can be loaded.
joinAChatroomOneArgVoidReturns<number>Function to join a chatroom.
markReadAChatroomOneArgVoidReturns<number>Marks a chatroom as read.
onLeaveChatroomOneArgVoidReturns<number>Leaves a chatroom.
checkForDmTab() => Promise<HideDMTabInfo \| null>Checks if the DM tab should be hidden.
approveDMRequestOneArgVoidReturns<string>Approves a direct message request.
rejectDMRequestOneArgVoidReturns<string>Rejects a direct message request.
currentSelectedChatroomIdnumber \| undefinedThe ID of the currently selected chatroom.✔️
selectNewChatroomOneArgVoidReturns<number>Function to select a new chatroom.

Reference

For reference checkout this file