Load previous messages
The load()
method of a PreviousMessageListQuery
instance returns a list of BaseMessage
objects. Using this method, you can retrieve previous messages in a specific channel. If you want to include the replies of the target messages in the results, change the value of properties in the PreviousMessageListQuery
instance.
For group channels, you can decide whether a user can see messages sent prior to the user joining the channel. To allow new users to view the message history of the group channels they joined, you can turn on Chat history by going to Settings > Chat > Channels > Group channels on Sendbird DashboardPreviousMessageListQuery
.