ChatPermissions class final
Describes actions that a user is allowed to take in a chat
Constructors
- ChatPermissions({required bool canSendBasicMessages, required bool canSendAudios, required bool canSendDocuments, required bool canSendPhotos, required bool canSendVideos, required bool canSendVideoNotes, required bool canSendVoiceNotes, required bool canSendPolls, required bool canSendOtherMessages, required bool canAddWebPagePreviews, required bool canChangeInfo, required bool canInviteUsers, required bool canPinMessages, required bool canCreateTopics})
-
Describes actions that a user is allowed to take in a chat
const
-
ChatPermissions.fromJson(Map<
String, dynamic> json) -
Parses a ChatPermissions from TDLib JSON.
factory
Properties
- canAddWebPagePreviews → bool
-
True, if the user may add a web page preview to their messages
final
- canChangeInfo → bool
-
True, if the user can change the chat title, photo, and other settings
final
- canCreateTopics → bool
-
True, if the user can create topics
final
- canInviteUsers → bool
-
True, if the user can invite new users to the chat
final
- canPinMessages → bool
-
True, if the user can pin messages
final
- canSendAudios → bool
-
True, if the user can send music files
final
- canSendBasicMessages → bool
-
True, if the user can send text messages, contacts, giveaways, giveaway winners, invoices, locations, and venues
final
- canSendDocuments → bool
-
True, if the user can send documents
final
- canSendOtherMessages → bool
-
True, if the user can send animations, games, stickers, and dice and use inline bots
final
- canSendPhotos → bool
-
True, if the user can send photos
final
- canSendPolls → bool
-
True, if the user can send polls
final
- canSendVideoNotes → bool
-
True, if the user can send video notes
final
- canSendVideos → bool
-
True, if the user can send videos
final
- canSendVoiceNotes → bool
-
True, if the user can send voice notes
final
- clientId → int?
-
Identifier of the TDLib client that sent this object, when known.
no setterinherited
- extra → dynamic
-
"@extra" of the request this object answers; null for updates.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{bool? canSendBasicMessages, bool? canSendAudios, bool? canSendDocuments, bool? canSendPhotos, bool? canSendVideos, bool? canSendVideoNotes, bool? canSendVoiceNotes, bool? canSendPolls, bool? canSendOtherMessages, bool? canAddWebPagePreviews, bool? canChangeInfo, bool? canInviteUsers, bool? canPinMessages, bool? canCreateTopics}) → ChatPermissions -
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g.
field: () => nullto clear it. -
getConstructor(
) → String -
TDLib type name, e.g.
updateNewMessage.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this object to TDLib JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- CONSTRUCTOR → const String
- TDLib type name.