ChatPermissions

@Serializable(with = ChatPermissions.Companion::class)
interface ChatPermissions

Represents any type with common permissions list

!!WARNING!! Default serializer of this interface is using Granular as surrogate and in fact serialized and deserialized as Granular. In case you wish some custom behaviour you must implement your own KSerializer or pass another serializer

Inheritors

Types

Link copied to clipboard
@Serializable
data class Common(val canSendPolls: Boolean? = null, val canSendOtherMessages: Boolean? = null, val canAddWebPagePreviews: Boolean? = null, val canChangeInfo: Boolean? = null, val canInviteUsers: Boolean? = null, val canPinMessages: Boolean? = null) : ChatPermissions
Link copied to clipboard
object Companion : KSerializer<ChatPermissions>
Link copied to clipboard
@Serializable
data class Granular(val canSendMessages: Boolean? = null, val canSendAudios: Boolean? = null, val canSendDocuments: Boolean? = null, val canSendPhotos: Boolean? = null, val canSendVideos: Boolean? = null, val canSendVideoNotes: Boolean? = null, val canSendVoiceNotes: Boolean? = null, val canSendPolls: Boolean? = null, val canSendOtherMessages: Boolean? = null, val canAddWebPagePreviews: Boolean? = null, val canChangeInfo: Boolean? = null, val canInviteUsers: Boolean? = null, val canPinMessages: Boolean? = null) : ChatPermissions

Properties

Link copied to clipboard
Link copied to clipboard
abstract val canChangeInfo: Boolean?
Link copied to clipboard
abstract val canInviteUsers: Boolean?
Link copied to clipboard
abstract val canPinMessages: Boolean?
Link copied to clipboard
abstract val canSendAudios: Boolean?
Link copied to clipboard
abstract val canSendDocuments: Boolean?
Link copied to clipboard
open val canSendGifs: Boolean?
Link copied to clipboard
abstract val canSendMessages: Boolean?
Link copied to clipboard
Link copied to clipboard
abstract val canSendPhotos: Boolean?
Link copied to clipboard
abstract val canSendPolls: Boolean?
Link copied to clipboard
Link copied to clipboard
abstract val canSendVideoNotes: Boolean?
Link copied to clipboard
abstract val canSendVideos: Boolean?
Link copied to clipboard
abstract val canSendVoiceNotes: Boolean?
Link copied to clipboard
@Transient
open val isGranular: Boolean

Functions

Link copied to clipboard
open fun copyCommon(canSendPolls: Boolean? = this.canSendPolls, canSendOtherMessages: Boolean? = this.canSendOtherMessages, canAddWebPagePreviews: Boolean? = this.canAddWebPagePreviews, canChangeInfo: Boolean? = this.canChangeInfo, canInviteUsers: Boolean? = this.canInviteUsers, canPinMessages: Boolean? = this.canPinMessages): ChatPermissions

Copying current instance as ChatPermissions, but realizations of this interface may differently override this method

Link copied to clipboard
open fun copyGranular(canSendMessages: Boolean? = this.canSendMessages, canSendAudios: Boolean? = this.canSendAudios, canSendDocuments: Boolean? = this.canSendDocuments, canSendPhotos: Boolean? = this.canSendPhotos, canSendVideos: Boolean? = this.canSendVideos, canSendVideoNotes: Boolean? = this.canSendVideoNotes, canSendVoiceNotes: Boolean? = this.canSendVoiceNotes, canSendPolls: Boolean? = this.canSendPolls, canSendOtherMessages: Boolean? = this.canSendOtherMessages, canAddWebPagePreviews: Boolean? = this.canAddWebPagePreviews, canChangeInfo: Boolean? = this.canChangeInfo, canInviteUsers: Boolean? = this.canInviteUsers, canPinMessages: Boolean? = this.canPinMessages): ChatPermissions

Copying current instance as ChatPermissions, but realizations of this interface may differently override this method