Message class final
Describes a message
Constructors
-
Message({required int id, required MessageSender senderId, MessageSender? receiverId, required int chatId, MessageSendingState? sendingState, MessageSchedulingState? schedulingState, required bool isOutgoing, required bool isPinned, required bool isFromOffline, required bool canBeSaved, required bool hasTimestampedMedia, required bool isChannelPost, required bool isPaidStarSuggestedPost, required bool isPaidGramSuggestedPost, required bool containsUnreadMention, required bool containsUnreadPollVotes, required int date, required int editDate, MessageForwardInfo? forwardInfo, MessageImportInfo? importInfo, MessageInteractionInfo? interactionInfo, required List<
UnreadReaction> unreadReactions, FactCheck? factCheck, SuggestedPostInfo? suggestedPostInfo, MessageReplyTo? replyTo, MessageTopic? topicId, MessageSelfDestructType? selfDestructType, required double selfDestructIn, required double autoDeleteIn, required int viaBotUserId, MessageSender? guestBotCallerId, required int senderBusinessBotUserId, required int senderBoostCount, required String senderTag, required int paidMessageStarCount, required String authorSignature, required int mediaAlbumId, required int effectId, RestrictionInfo? restrictionInfo, required String summaryLanguageCode, required MessageContent content, EphemeralMessageContent? ephemeralContent, ReplyMarkup? replyMarkup, required int ephemeralMessageId, required int chatInstance, dynamic extra, int? clientId}) -
Describes a message
const
-
Message.fromJson(Map<
String, dynamic> json) -
Parses a Message from TDLib JSON.
factory
Properties
-
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
- canBeSaved → bool
-
True, if content of the message can be saved locally
final
- chatId → int
-
Chat identifier
final
- chatInstance → int
-
Identifier that uniquely corresponds to the chat to which the message was sent; for bots only
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
- containsUnreadPollVotes → bool
-
True, if the message is a poll message with unread votes
final
- content → MessageContent
-
Content of the message
final
- date → int
-
Point in time (Unix timestamp) when the message was sent; 0 for scheduled messages
final
- editDate → int
-
Point in time (Unix timestamp) when the message was last edited; 0 for scheduled messages. If getOption("show_message_edit_date_by_default") is true, then the date must be shown along with the message instead of the date when the message was sent
final
- effectId → int
-
Unique identifier of the effect added to the message; 0 if none
final
- ephemeralContent → EphemeralMessageContent?
-
Content of the message, which is visible only to the current user and must be shown instead of the regular content; may be null if none
final
- ephemeralMessageId → int
-
Unique identifier of the ephemeral message if the message is ephemeral; for bots only
final
- extra → dynamic
-
"@extra" of the request this object answers.
final
- factCheck → FactCheck?
-
Information about fact-check added to the message; may be null if none
final
- forwardInfo → MessageForwardInfo?
-
Information about the initial message sender; may be null if none or unknown
final
- guestBotCallerId → MessageSender?
-
The identifier of the user or chat which used a guest bot to send the message; may be null if none
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
- isFromOffline → bool
-
True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message
final
- isOutgoing → bool
-
True, if the message is outgoing
final
- isPaidGramSuggestedPost → bool
-
True, if the message is a suggested channel post which was paid in TON Grams; a warning must be shown if the message is deleted in less than getOption("suggested_post_lifetime_min") seconds after sending
final
- isPaidStarSuggestedPost → bool
-
True, if the message is a suggested channel post which was paid in Telegram Stars; a warning must be shown if the message is deleted in less than getOption("suggested_post_lifetime_min") seconds after sending
final
- isPinned → bool
-
True, if the message is pinned
final
- mediaAlbumId → int
-
Unique identifier of an album this message belongs to; 0 if none. Only audios, documents, photos and videos can be grouped together in albums
final
- paidMessageStarCount → int
-
The number of Telegram Stars the sender paid to send the message
final
- receiverId → MessageSender?
-
Identifier of the user or the chat which received the ephemeral message; may be null. Always null for non-ephemeral messages
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
- restrictionInfo → RestrictionInfo?
-
Information about the restrictions that must be applied to the message content; may be null if none
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-destruction isn't scheduled yet
final
- selfDestructType → MessageSelfDestructType?
-
The message's self-destruct type; may be null if none
final
- senderBoostCount → int
-
Number of times the sender of the message boosted the supergroup at the time the message was sent; 0 if none or unknown. For messages sent by the current user, supergroupFullInfo.my_boost_count must be used instead
final
- senderBusinessBotUserId → int
-
If non-zero, the user identifier of the business bot that sent this message
final
- senderId → MessageSender
-
Identifier of the sender of the message
final
- senderTag → String
-
Tag of the sender of the message in the supergroup at the time the message was sent; may be empty if none or unknown. For messages sent in basic groups or by supergroup administrators, the current custom title or tag must be used instead
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
- suggestedPostInfo → SuggestedPostInfo?
-
Information about the suggested post; may be null if the message isn't a suggested post
final
- summaryLanguageCode → String
-
IETF language tag of the message language on which it can be summarized; empty if summary isn't available for the message
final
- topicId → MessageTopic?
-
Identifier of the topic within the chat to which the message belongs; may be null if none; may change when the chat is converted to a forum or back
final
-
unreadReactions
→ List<
UnreadReaction> -
Information about unread reactions added to the message
final
- viaBotUserId → int
-
If non-zero, the user identifier of the inline bot through which this message was sent
final
Methods
-
copyWith(
{int? id, MessageSender? senderId, MessageSender? receiverId()?, int? chatId, MessageSendingState? sendingState()?, MessageSchedulingState? schedulingState()?, bool? isOutgoing, bool? isPinned, bool? isFromOffline, bool? canBeSaved, bool? hasTimestampedMedia, bool? isChannelPost, bool? isPaidStarSuggestedPost, bool? isPaidGramSuggestedPost, bool? containsUnreadMention, bool? containsUnreadPollVotes, int? date, int? editDate, MessageForwardInfo? forwardInfo()?, MessageImportInfo? importInfo()?, MessageInteractionInfo? interactionInfo()?, List< UnreadReaction> ? unreadReactions, FactCheck? factCheck()?, SuggestedPostInfo? suggestedPostInfo()?, MessageReplyTo? replyTo()?, MessageTopic? topicId()?, MessageSelfDestructType? selfDestructType()?, double? selfDestructIn, double? autoDeleteIn, int? viaBotUserId, MessageSender? guestBotCallerId()?, int? senderBusinessBotUserId, int? senderBoostCount, String? senderTag, int? paidMessageStarCount, String? authorSignature, int? mediaAlbumId, int? effectId, RestrictionInfo? restrictionInfo()?, String? summaryLanguageCode, MessageContent? content, EphemeralMessageContent? ephemeralContent()?, ReplyMarkup? replyMarkup()?, int? ephemeralMessageId, int? chatInstance, dynamic extra, int? clientId}) → Message -
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.