Message class
Describes a message.
- Inheritance
- Available Extensions
Constructors
-
Message({required int id, required MessageSender sender_id, required int chat_id, MessageSendingState? sending_state, MessageSchedulingState? scheduling_state, required bool is_outgoing, required bool is_pinned, required bool can_be_edited, required bool can_be_forwarded, required bool can_be_saved, required bool can_be_deleted_only_for_self, required bool can_be_deleted_for_all_users, required bool can_get_added_reactions, required bool can_get_statistics, required bool can_get_message_thread, required bool can_get_viewers, required bool can_get_media_timestamp_links, required bool can_report_reactions, required bool has_timestamped_media, required bool is_channel_post, required bool is_topic_message, required bool contains_unread_mention, required int date, required int edit_date, MessageForwardInfo? forward_info, MessageInteractionInfo? interaction_info, required List<
UnreadReaction> unread_reactions, MessageReplyTo? reply_to, required int message_thread_id, MessageSelfDestructType? self_destruct_type, required double self_destruct_in, required double auto_delete_in, required int via_bot_user_id, required String author_signature, required int64 media_album_id, required String restriction_reason, required MessageContent content, ReplyMarkup? reply_markup, int? extra, int? clientId}) - Describes a message
Properties
-
For channel posts and anonymous group messages, optional author signature.
read / write
- auto_delete_in ↔ double
-
Time left before the message will be automatically deleted by message_auto_delete_time setting of the chat, in seconds; 0 if never.
read / write
- can_be_deleted_for_all_users ↔ bool
-
True, if the message can be deleted for all users.
read / write
- can_be_deleted_only_for_self ↔ bool
-
True, if the message can be deleted only for the current user while other users will continue to see it.
read / write
- can_be_edited ↔ 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.
read / write
- can_be_forwarded ↔ bool
-
True, if the message can be forwarded.
read / write
- can_be_saved ↔ bool
-
True, if content of the message can be saved locally or copied.
read / write
- can_get_added_reactions ↔ bool
-
True, if the list of added reactions is available through getMessageAddedReactions.
read / write
- can_get_media_timestamp_links ↔ bool
-
True, if media timestamp links can be generated for media timestamp entities in the message text, caption or web page description through getMessageLink.
read / write
- can_get_message_thread ↔ bool
-
True, if information about the message thread is available through getMessageThread and getMessageThreadHistory.
read / write
- can_get_statistics ↔ bool
-
True, if the message statistics are available through getMessageStatistics.
read / write
- can_get_viewers ↔ bool
-
True, if chat members already viewed the message can be received through getMessageViewers.
read / write
- can_report_reactions ↔ bool
-
True, if reactions on the message can be reported through reportMessageReactions.
read / write
- chat_id ↔ int
-
Chat identifier.
read / write
- clientId ↔ int?
-
TDLib client instance identifier, for which the response was received.
read / writeoverride
- contains_unread_mention ↔ bool
-
True, if the message contains an unread mention for the current user.
read / write
- content ↔ MessageContent
-
Content of the message.
read / write
- date ↔ int
-
Point in time (Unix timestamp) when the message was sent.
read / write
- edit_date ↔ int
-
Point in time (Unix timestamp) when the message was last edited.
read / write
- extra ↔ int?
-
Request identifier. Must be non-zero.
read / writeoverride
- forward_info ↔ MessageForwardInfo?
-
Information about the initial message sender; may be null if none or unknown.
read / write
- has_timestamped_media ↔ bool
-
True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message.
read / write
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- id ↔ int
-
Message identifier; unique for the chat to which the message belongs.
read / write
- interaction_info ↔ MessageInteractionInfo?
-
Information about interactions with the message; may be null if none.
read / write
- is_channel_post ↔ bool
-
True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts.
read / write
- is_outgoing ↔ bool
-
True, if the message is outgoing.
read / write
- is_pinned ↔ bool
-
True, if the message is pinned.
read / write
- is_topic_message ↔ bool
-
True, if the message is a forum topic message.
read / write
- media_album_id ↔ int64
-
Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums.
; string representation of int, use
int.parse
read / write - message_thread_id ↔ int
-
If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs.
read / write
- reply_markup ↔ ReplyMarkup?
-
Reply markup for the message; may be null if none.
read / write
- reply_to ↔ MessageReplyTo?
-
Information about the message or the story this message is replying to; may be null if none.
read / write
- restriction_reason ↔ String
-
If non-empty, contains a human-readable description of the reason why access to this message must be restricted.
read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- scheduling_state ↔ MessageSchedulingState?
-
The scheduling state of the message; may be null if the message isn't scheduled.
read / write
- self_destruct_in ↔ double
-
Time left before the message self-destruct timer expires, in seconds; 0 if self-desctruction isn't scheduled yet.
read / write
- self_destruct_type ↔ MessageSelfDestructType?
-
The message's self-destruct type; may be null if none.
read / write
- sender_id ↔ MessageSender
-
Identifier of the sender of the message.
read / write
- sending_state ↔ MessageSendingState?
-
The sending state of the message; may be null if the message isn't being sent and didn't fail to be sent.
read / write
-
unread_reactions
↔ List<
UnreadReaction> -
Information about unread reactions added to the message.
read / write
- via_bot_user_id ↔ int
-
If non-zero, the user identifier of the bot through which this message was sent.
read / write
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Object to Map serializer
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
Constants
- CONSTRUCTOR → const String
-
@type
"message"