MessageProperties class final
Contains properties of a message and describes actions that can be done with the message right now
- Inheritance
- Available extensions
- Annotations
-
- @immutable
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 bool hasProtectedContentByCurrentUser, required bool hasProtectedContentByOtherUser, required bool needShowStatistics})
Properties
- canAddOffer → bool
-
canAddOffer True, if an offer can be added to the message using addOffer
final
- canAddTasks → bool
-
canAddTasks True, if tasks can be added to the message's checklist using
addChecklistTasks if the current user has Telegram Premium subscription
final
- canBeApproved → bool
-
canBeApproved True, if the message is a suggested post that can be
approved by the user using approveSuggestedPost
final
- canBeCopied → bool
-
canBeCopied True, if content of the message can be copied using
inputMessageForwarded or forwardMessages with copy options
final
- canBeCopiedToSecretChat → bool
-
canBeCopiedToSecretChat True, if content of the message can be copied to
a secret chat using inputMessageForwarded or forwardMessages with copy
options
final
- canBeDeclined → bool
-
canBeDeclined True, if the message is a suggested post that can be
declined by the user using declineSuggestedPost
final
- canBeDeletedForAllUsers → bool
-
canBeDeletedForAllUsers True, if the message can be deleted for all
users using the method deleteMessages with revoke == true
final
- canBeDeletedOnlyForSelf → bool
-
canBeDeletedOnlyForSelf 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
-
canBeEdited True, if the message can be edited using the methods
editMessageText, editMessageCaption, or editMessageReplyMarkup. For live
location, poll, and checklist messages this fields shows whether
editMessageLiveLocation, stopPoll, or editMessageChecklist respectively
can be used with this message
final
- canBeForwarded → bool
-
canBeForwarded True, if the message can be forwarded using
inputMessageForwarded or forwardMessages without copy options
final
- canBePaid → bool
-
canBePaid True, if the message can be paid using inputInvoiceMessage
final
- canBePinned → bool
-
canBePinned True, if the message can be pinned or unpinned in the chat
using pinChatMessage or unpinChatMessage
final
- canBeReplied → bool
-
canBeReplied 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
-
canBeRepliedInAnotherChat True, if the message can be replied in another
chat or forum topic using inputMessageReplyToExternalMessage
final
- canBeSaved → bool
-
canBeSaved True, if content of the message can be saved locally
final
-
canBeSharedInStory True, if the message can be shared in a story using
inputStoryAreaTypeMessage
final
- canDeleteReactions → bool
-
canDeleteReactions True, if the user can delete reactions of other users
in the message using the method deleteMessageReactionsFromSender
final
- canEditMedia → bool
-
canEditMedia True, if the message can be edited using the method
editMessageMedia
final
- canEditSchedulingState → bool
-
canEditSchedulingState True, if scheduling state of the message can be
edited
final
- canEditSuggestedPostInfo → bool
-
canEditSuggestedPostInfo True, if another price or post send time can be
suggested using addOffer
final
- canGetAuthor → bool
-
canGetAuthor True, if author of the message sent on behalf of a chat can
be received through getMessageAuthor
final
- canGetEmbeddingCode → bool
-
canGetEmbeddingCode True, if code for message embedding can be received
using getMessageEmbeddingCode
final
- canGetLink → bool
-
canGetLink True, if a link can be generated for the message using
getMessageLink
final
- canGetMediaTimestampLinks → bool
-
canGetMediaTimestampLinks 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
-
canGetMessageThread True, if information about the message thread is
available through getMessageThread and getMessageThreadHistory
final
- canGetPollVoteStatistics → bool
-
canGetPollVoteStatistics True, if the message is a poll and vote
statistics are available through getPollVoteStatistics
final
- canGetReadDate → bool
-
canGetReadDate True, if read date of the message can be received through
getMessageReadDate
final
- canGetStatistics → bool
-
canGetStatistics True, if message statistics are available through
getMessageStatistics and message forwards can be received using
getMessagePublicForwards
final
- canGetVideoAdvertisements → bool
-
canGetVideoAdvertisements True, if advertisements for video of the
message can be received through getVideoMessageAdvertisements
final
- canGetViewers → bool
-
canGetViewers True, if chat members already viewed the message can be
received through getMessageViewers
final
- canMarkTasksAsDone → bool
-
canMarkTasksAsDone 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
-
canRecognizeSpeech True, if speech can be recognized for the message
through recognizeSpeech
final
- canReportChat → bool
-
canReportChat True, if the message can be reported using reportChat
final
- canReportReactions → bool
-
canReportReactions True, if reactions on the message can be reported
through reportMessageReactions
final
- canReportSupergroupSpam → bool
-
canReportSupergroupSpam True, if the message can be reported using
reportSupergroupSpam
final
- canSetFactCheck → bool
-
canSetFactCheck True, if fact check for the message can be changed
through setMessageFactCheck
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasProtectedContentByCurrentUser → bool
-
hasProtectedContentByCurrentUser 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
-
hasProtectedContentByOtherUser 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
-
needShowStatistics 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, bool? hasProtectedContentByCurrentUser, bool? hasProtectedContentByOtherUser, bool? needShowStatistics}) → MessageProperties -
Available on MessageProperties, provided by the MessagePropertiesExtensions extension
-
getConstructor(
) → String -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromJson(
Map< String, dynamic> ? json) → MessageProperties?
Constants
- constructor → const String