canPinMessage
fun canPinMessage(pinMessageEnabled: Boolean, message: Message, ownCapabilities: Set<String>): Boolean
Determines whether the given message can be pinned or unpinned.
A message can be pinned when:
Pin message functionality is enabled in the UI configuration
The message has been successfully synced with the backend
The user has the capability to pin messages in the channel
Return
true if the message can be pinned or unpinned, false otherwise.
Parameters
pinMessageEnabled
Whether the pin message feature is enabled in the UI.
message
The message to check for pin eligibility.
ownCapabilities
The set of capabilities the current user has in the channel.