Skip to main content

LMMessageListContext

Introduction

The LMMessageListContext provides the referance to complete conversations data of the loaded chatroom. You can access these to interact with the conversation list. By default all of the conversations are wrapped inside this context.

PropertyTypeDescriptionOptional
conversationsConversation[] | nullList of conversation messages.
getChatroomConversationsOnTopScrollFunctionFunction to fetch conversations on top scroll.✔️
getChatroomConversationsOnBottomScrollFunctionFunction to fetch conversations on bottom scroll.✔️
bottomReferenceDivMutableRefObject<HTMLDivElement \| null>Reference to the bottom of the message list.
messageListContainerRefMutableRefObject<HTMLDivElement \| null>Reference to the message list container.
unBlockUserInDMZeroArgVoidReturnsFunction to unblock a user in direct messages.
searchedConversationRefMutableRefObject<HTMLDivElement \| null>Reference to the searched conversation.
setChatroomTopicReact.Dispatch<Conversation | null>Function to set the chatroom topic.
chatroomTopicConversation | nullThe chatroom topic.
shouldScrollToBottomMutableRefObject<boolean>Determines if the chat should scroll to the bottom.

Reference

For reference checkout this file