Skip to main content

LMMessageContext

Introduction

The LMMessageContext provides the data and functions related to each individual conversation. By default this context is wrapped around each individual conversation. You can use this context to manage and interact with a single conversation.

PropertyTypeDescriptionOptional
messageConversationThe conversation message.
indexnumberThe index of the message.
deleteMessageZeroArgVoidReturnsFunction to delete the message.
chatroomTopicZeroArgVoidReturnsFunction to fetch the chatroom topic.
editMessageLocallyOneArgVoidReturns<Conversation>Function to edit a message locally.
addReactionLocallyOneArgVoidReturns<EmojiData>Function to add a reaction locally.
removeReactionLocallyZeroArgVoidReturnsFunction to remove a reaction locally.
addPollOptionLocallyOneArgVoidReturns<PollOptionNew>Function to add a poll option locally.
updatePollOnSubmitLocallyOneArgVoidReturns<string[]>Function to update a poll when submitted.

Reference

For reference checkout this file