MessageProperties class final
Contains properties of a message and describes actions that can be done with the message right now
Constructors
-
MessageProperties({required bool canAddOffer, required bool canAddTasks, required bool canBeApproved, required bool canBeCopied, required bool canBeCopiedToSecretChat, required bool canBeDeclined, required bool canBeDeletedOnlyForSelf, required bool canBeDeletedForAllUsers, required bool canBeEdited, required bool canBeForwarded, required bool canBePaid, required bool canBePinned, required bool canBeReplied, required bool canBeRepliedInAnotherChat, required bool canBeSaved, required bool canDeleteReactions, required bool canEditMedia, required bool canEditSchedulingState, required bool canEditSuggestedPostInfo, required bool canGetAuthor, required bool canGetEmbeddingCode, required bool canGetLink, required bool canGetMediaTimestampLinks, required bool canGetMessageThread, required bool canGetPollVoteStatistics, required bool canGetReadDate, required bool canGetStatistics, required bool canGetVideoAdvertisements, required bool canGetViewers, required bool canMarkTasksAsDone, required bool canRecognizeSpeech, required bool canReportChat, required bool canReportReactions, required bool canReportSupergroupSpam, required bool canSetFactCheck, required List<
int> customEmojiIds, required bool hasProtectedContentByCurrentUser, required bool hasProtectedContentByOtherUser, required bool needShowStatistics, dynamic extra, int? clientId}) -
Contains properties of a message and describes actions that can be done with the message right now
const
-
MessageProperties.fromJson(Map<
String, dynamic> json) -
Parses a MessageProperties from TDLib JSON.
factory
Properties
- canAddOffer → bool
-
True, if an offer can be added to the message using addOffer
final
- canAddTasks → bool
-
True, if tasks can be added to the message's checklist using addChecklistTasks if the current user has Telegram Premium subscription
final
- canBeApproved → bool
-
True, if the message is a suggested post that can be approved by the user using approveSuggestedPost
final
- canBeCopied → bool
-
True, if content of the message can be copied using inputMessageForwarded or forwardMessages with copy options
final
- canBeCopiedToSecretChat → bool
-
True, if content of the message can be copied to a secret chat using inputMessageForwarded or forwardMessages with copy options
final
- canBeDeclined → bool
-
True, if the message is a suggested post that can be declined by the user using declineSuggestedPost
final
- canBeDeletedForAllUsers → bool
-
True, if the message can be deleted for all users using the method deleteMessages with revoke == true
final
- canBeDeletedOnlyForSelf → bool
-
True, if the message can be deleted only for the current user while other users will continue to see it using the method deleteMessages with revoke == false
final
- canBeEdited → bool
-
True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup. For live location, poll, and checklist messages this field shows whether editMessageLiveLocation, stopPoll, or editMessageChecklist respectively can be used with this message
final
- canBeForwarded → bool
-
True, if the message can be forwarded using inputMessageForwarded or forwardMessages without copy options
final
- canBePaid → bool
-
True, if the message can be paid using inputInvoiceMessage
final
- canBePinned → bool
-
True, if the message can be pinned or unpinned in the chat using pinChatMessage or unpinChatMessage
final
- canBeReplied → bool
-
True, if the message can be replied in the same chat and forum topic using inputMessageReplyToMessage. Ephemeral messages can be replied only by other ephemeral messages
final
- canBeRepliedInAnotherChat → bool
-
True, if the message can be replied in another chat or forum topic using inputMessageReplyToExternalMessage
final
- canBeSaved → bool
-
True, if content of the message can be saved locally
final
-
True, if the message can be shared in a story using inputStoryAreaTypeMessage
final
- canDeleteReactions → bool
-
True, if the user can delete reactions of other users in the message using the method deleteMessageReactionsFromSender
final
- canEditMedia → bool
-
True, if the message can be edited using the method editMessageMedia
final
- canEditSchedulingState → bool
-
True, if scheduling state of the message can be edited
final
- canEditSuggestedPostInfo → bool
-
True, if another price or post send time can be suggested using addOffer
final
- canGetAuthor → bool
-
True, if author of the message sent on behalf of a chat can be received through getMessageAuthor
final
- canGetEmbeddingCode → bool
-
True, if code for message embedding can be received using getMessageEmbeddingCode
final
- canGetLink → bool
-
True, if a link can be generated for the message using getMessageLink
final
- canGetMediaTimestampLinks → bool
-
True, if media timestamp links can be generated for media timestamp entities in the message text, caption, or link preview description using getMessageLink
final
- canGetMessageThread → bool
-
True, if information about the message thread is available through getMessageThread and getMessageThreadHistory
final
- canGetPollVoteStatistics → bool
-
True, if the message is a poll and vote statistics are available through getPollVoteStatistics
final
- canGetReadDate → bool
-
True, if read date of the message can be received through getMessageReadDate
final
- canGetStatistics → bool
-
True, if message statistics are available through getMessageStatistics and message forwards can be received using getMessagePublicForwards
final
- canGetVideoAdvertisements → bool
-
True, if advertisements for video of the message can be received through getVideoMessageAdvertisements
final
- canGetViewers → bool
-
True, if chat members already viewed the message can be received through getMessageViewers
final
- canMarkTasksAsDone → bool
-
True, if tasks can be marked as done or not done in the message's checklist using markChecklistTasksAsDone if the current user has Telegram Premium subscription
final
- canRecognizeSpeech → bool
-
True, if speech can be recognized for the message through recognizeSpeech
final
- canReportChat → bool
-
True, if the message can be reported using reportChat
final
- canReportReactions → bool
-
True, if reactions on the message can be reported through reportMessageReactions
final
- canReportSupergroupSpam → bool
-
True, if the message can be reported using reportSupergroupSpam
final
- canSetFactCheck → bool
-
True, if fact check for the message can be changed through setMessageFactCheck
final
- clientId → int?
-
Identifier of the TDLib client that sent this object.
final
-
customEmojiIds
→ List<
int> -
Identifiers of custom emoji used in the message
final
- extra → dynamic
-
"@extra" of the request this object answers.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasProtectedContentByCurrentUser → bool
-
True, if content of the message can't be saved locally, because it is protected by the current user; if true, then can_be_saved is false
final
- hasProtectedContentByOtherUser → bool
-
True, if content of the message can't be saved locally, because it is protected by the other user; if true, then can_be_saved is false
final
- needShowStatistics → bool
-
True, if message statistics must be available from context menu of the message
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{bool? canAddOffer, bool? canAddTasks, bool? canBeApproved, bool? canBeCopied, bool? canBeCopiedToSecretChat, bool? canBeDeclined, bool? canBeDeletedOnlyForSelf, bool? canBeDeletedForAllUsers, bool? canBeEdited, bool? canBeForwarded, bool? canBePaid, bool? canBePinned, bool? canBeReplied, bool? canBeRepliedInAnotherChat, bool? canBeSaved, bool? canDeleteReactions, bool? canEditMedia, bool? canEditSchedulingState, bool? canEditSuggestedPostInfo, bool? canGetAuthor, bool? canGetEmbeddingCode, bool? canGetLink, bool? canGetMediaTimestampLinks, bool? canGetMessageThread, bool? canGetPollVoteStatistics, bool? canGetReadDate, bool? canGetStatistics, bool? canGetVideoAdvertisements, bool? canGetViewers, bool? canMarkTasksAsDone, bool? canRecognizeSpeech, bool? canReportChat, bool? canReportReactions, bool? canReportSupergroupSpam, bool? canSetFactCheck, List< int> ? customEmojiIds, bool? hasProtectedContentByCurrentUser, bool? hasProtectedContentByOtherUser, bool? needShowStatistics, dynamic extra, int? clientId}) → MessageProperties -
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.