List pinned messages
To retrieve all the pinned messages in a group channel, use PinnedMessageListQuery
.
First, create a PinnedMessageListQueryParams
object. This query params has properties such as channelUrl
, channelType
, and messagePayloadParams
. Especially messagePayloadParams
contains booleans that determine which additional information to include in the pinned message payloads. For example, if a pinned message is a child message in a message thread, set includeParentMessageInfo
to true
in the query to show its parent message information in the message payload.
Once the query params is set, pass it to the createPinnedMessageListQuery()
method to create a query. This query retrieves a list of pinned messages with relevant information specified in the messagePayloadParams
instance.