Skip to main content

useDMChannelLists

Introduction

The useDMChannelLists hook is used to implement channel list for Dm chatrooms. You can use these to create your own custom UI for DM Channel lists. Its returns the follwing values.

PropertyTypeDescriptionOptional
dmChatroomsChatroom[]List of direct message chatrooms.
loadMoreDmChatroomsbooleanIndicates if more DM chatrooms can be loaded.
conversationsDataRecord<string, Conversation>Mapping of conversation IDs to their details.
usersDataRecord<string, Member>Mapping of user IDs to their details.
getDMChatroomsListZeroArgVoidReturnsFetches the list of DM chatrooms.
refreshDMChatroomsOneArgVoidReturnsRefreshes a specific DM chatroom by ID.
markReadADMChatroomOneArgVoidReturnsMarks a DM chatroom as read by ID.
selectNewChatroomOneArgVoidReturnsSelects a new chatroom by ID.
currentSelectedChatroomIdnumberID of the currently selected chatroom.✔️
showDMbooleanIndicates whether the DM chatrooms should be displayed.
showListnumberRepresents the visible chatroom list state.

Reference

For reference checkout this file