Message class final

Describes a message

Inheritance

Constructors

Message({required int id, required MessageSender senderId, required int chatId, MessageSendingState? sendingState, MessageSchedulingState? schedulingState, required bool isOutgoing, required bool isPinned, required bool canBeEdited, required bool canBeForwarded, required bool canBeSaved, required bool canBeDeletedOnlyForSelf, required bool canBeDeletedForAllUsers, required bool canGetAddedReactions, required bool canGetStatistics, required bool canGetMessageThread, required bool canGetViewers, required bool canGetMediaTimestampLinks, required bool canReportReactions, required bool hasTimestampedMedia, required bool isChannelPost, required bool isTopicMessage, required bool containsUnreadMention, required int date, required int editDate, MessageForwardInfo? forwardInfo, MessageImportInfo? importInfo, MessageInteractionInfo? interactionInfo, required List<UnreadReaction> unreadReactions, MessageReplyTo? replyTo, required int messageThreadId, MessageSelfDestructType? selfDestructType, required double selfDestructIn, required double autoDeleteIn, required int viaBotUserId, required String authorSignature, required int mediaAlbumId, required String restrictionReason, required MessageContent content, ReplyMarkup? replyMarkup, dynamic extra, int? clientId})
Describes a message
const
Message.fromJson(Map<String, dynamic> json)
Parses a Message from TDLib JSON.
factory

Properties

authorSignature → String
For channel posts and anonymous group messages, optional author signature
final
autoDeleteIn → double
Time left before the message will be automatically deleted by message_auto_delete_time setting of the chat, in seconds; 0 if never
final
canBeDeletedForAllUsers → bool
True, if the message can be deleted for all users
final
canBeDeletedOnlyForSelf → bool
True, if the message can be deleted only for the current user while other users will continue to see it
final
canBeEdited → bool
True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the application
final
canBeForwarded → bool
True, if the message can be forwarded
final
canBeSaved → bool
True, if content of the message can be saved locally or copied
final
canGetAddedReactions → bool
True, if the list of added reactions is available through getMessageAddedReactions
final
True, if media timestamp links can be generated for media timestamp entities in the message text, caption or web page description through getMessageLink
final
canGetMessageThread → bool
True, if information about the message thread is available through getMessageThread and getMessageThreadHistory
final
canGetStatistics → bool
True, if the message statistics are available through getMessageStatistics
final
canGetViewers → bool
True, if chat members already viewed the message can be received through getMessageViewers
final
canReportReactions → bool
True, if reactions on the message can be reported through reportMessageReactions
final
chatId → int
Chat identifier
final
clientId → int?
Identifier of the TDLib client that sent this object.
final
containsUnreadMention → bool
True, if the message contains an unread mention for the current user
final
content → MessageContent
Content of the message
final
date → int
Point in time (Unix timestamp) when the message was sent
final
editDate → int
Point in time (Unix timestamp) when the message was last edited
final
extra → dynamic
"@extra" of the request this object answers.
final
forwardInfo → MessageForwardInfo?
Information about the initial message sender; may be null if none or unknown
final
hashCode → int
The hash code for this object.
no setterinherited
hasTimestampedMedia → bool
True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message
final
id → int
Message identifier; unique for the chat to which the message belongs
final
importInfo → MessageImportInfo?
Information about the initial message for messages created with importMessages; may be null if the message isn't imported
final
interactionInfo → MessageInteractionInfo?
Information about interactions with the message; may be null if none
final
isChannelPost → bool
True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts
final
isOutgoing → bool
True, if the message is outgoing
final
isPinned → bool
True, if the message is pinned
final
isTopicMessage → bool
True, if the message is a forum topic message
final
mediaAlbumId → int
Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums
final
messageThreadId → int
If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs
final
replyMarkup → ReplyMarkup?
Reply markup for the message; may be null if none
final
replyTo → MessageReplyTo?
Information about the message or the story this message is replying to; may be null if none
final
restrictionReason → String
If non-empty, contains a human-readable description of the reason why access to this message must be restricted
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
schedulingState → MessageSchedulingState?
The scheduling state of the message; may be null if the message isn't scheduled
final
selfDestructIn → double
Time left before the message self-destruct timer expires, in seconds; 0 if self-desctruction isn't scheduled yet
final
selfDestructType → MessageSelfDestructType?
The message's self-destruct type; may be null if none
final
senderId → MessageSender
Identifier of the sender of the message
final
sendingState → MessageSendingState?
The sending state of the message; may be null if the message isn't being sent and didn't fail to be sent
final
unreadReactions → List<UnreadReaction>
Information about unread reactions added to the message
final
viaBotUserId → int
If non-zero, the user identifier of the bot through which this message was sent
final

Methods

copyWith({int? id, MessageSender? senderId, int? chatId, MessageSendingState? sendingState()?, MessageSchedulingState? schedulingState()?, bool? isOutgoing, bool? isPinned, bool? canBeEdited, bool? canBeForwarded, bool? canBeSaved, bool? canBeDeletedOnlyForSelf, bool? canBeDeletedForAllUsers, bool? canGetAddedReactions, bool? canGetStatistics, bool? canGetMessageThread, bool? canGetViewers, bool? canGetMediaTimestampLinks, bool? canReportReactions, bool? hasTimestampedMedia, bool? isChannelPost, bool? isTopicMessage, bool? containsUnreadMention, int? date, int? editDate, MessageForwardInfo? forwardInfo()?, MessageImportInfo? importInfo()?, MessageInteractionInfo? interactionInfo()?, List<UnreadReaction>? unreadReactions, MessageReplyTo? replyTo()?, int? messageThreadId, MessageSelfDestructType? selfDestructType()?, double? selfDestructIn, double? autoDeleteIn, int? viaBotUserId, String? authorSignature, int? mediaAlbumId, String? restrictionReason, MessageContent? content, ReplyMarkup? replyMarkup()?, dynamic extra, int? clientId}) → Message
Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to 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.