-
Message identifier, unique for the chat to which the message belongs
Declaration
Swift
public let id: Int53 -
Identifier of the user who sent the message; 0 if unknown. Currently, it is unknown for channel posts and for channel posts automatically forwarded to discussion group
Declaration
Swift
public let senderUserId: Int32 -
Chat identifier
Declaration
Swift
public let chatId: Int53 -
Information about the sending state of the message; may be null
Declaration
Swift
public let sendingState: MessageSendingState? -
Information about the scheduling state of the message; may be null
Declaration
Swift
public let schedulingState: MessageSchedulingState? -
True, if the message is outgoing
Declaration
Swift
public let isOutgoing: 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 client
Declaration
Swift
public let canBeEdited: Bool -
True, if the message can be forwarded
Declaration
Swift
public let canBeForwarded: Bool -
True, if the message can be deleted only for the current user while other users will continue to see it
Declaration
Swift
public let canBeDeletedOnlyForSelf: Bool -
True, if the message can be deleted for all users
Declaration
Swift
public let canBeDeletedForAllUsers: Bool -
True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts
Declaration
Swift
public let isChannelPost: Bool -
True, if the message contains an unread mention for the current user
Declaration
Swift
public let containsUnreadMention: Bool -
Point in time (Unix timestamp) when the message was sent
Declaration
Swift
public let date: Int32 -
Point in time (Unix timestamp) when the message was last edited
Declaration
Swift
public let editDate: Int32 -
Information about the initial message sender; may be null
Declaration
Swift
public let forwardInfo: MessageForwardInfo? -
If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message
Declaration
Swift
public let replyToMessageId: Int53 -
For self-destructing messages, the message’s TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires
Declaration
Swift
public let ttl: Int32 -
Time left before the message expires, in seconds
Declaration
Swift
public let ttlExpiresIn: Double -
If non-zero, the user identifier of the bot through which this message was sent
Declaration
Swift
public let viaBotUserId: Int32 -
For channel posts, optional author signature
Declaration
Swift
public let authorSignature: String -
Number of times this message was viewed
Declaration
Swift
public let views: Int32 -
Unique identifier of an album this message belongs to. Only photos and videos can be grouped together in albums
Declaration
Swift
public let mediaAlbumId: TDInt64 -
If non-empty, contains a human-readable description of the reason why access to this message must be restricted
Declaration
Swift
public let restrictionReason: String -
Content of the message
Declaration
Swift
public let content: MessageContent -
Reply markup for the message; may be null
Declaration
Swift
public let replyMarkup: ReplyMarkup? -
init(id:senderUserId:chatId:sendingState:schedulingState:isOutgoing:canBeEdited:canBeForwarded:canBeDeletedOnlyForSelf:canBeDeletedForAllUsers:isChannelPost:containsUnreadMention:date:editDate:forwardInfo:replyToMessageId:ttl:ttlExpiresIn:viaBotUserId:authorSignature:views:mediaAlbumId:restrictionReason:content:replyMarkup:)Describes a message
Declaration
Swift
public init(id: Int53, senderUserId: Int32, chatId: Int53, sendingState: MessageSendingState?, schedulingState: MessageSchedulingState?, isOutgoing: Bool, canBeEdited: Bool, canBeForwarded: Bool, canBeDeletedOnlyForSelf: Bool, canBeDeletedForAllUsers: Bool, isChannelPost: Bool, containsUnreadMention: Bool, date: Int32, editDate: Int32, forwardInfo: MessageForwardInfo?, replyToMessageId: Int53, ttl: Int32, ttlExpiresIn: Double, viaBotUserId: Int32, authorSignature: String, views: Int32, mediaAlbumId: TDInt64, restrictionReason: String, content: MessageContent, replyMarkup: ReplyMarkup?)Parameters
idMessage identifier, unique for the chat to which the message belongs
senderUserIdIdentifier of the user who sent the message; 0 if unknown. Currently, it is unknown for channel posts and for channel posts automatically forwarded to discussion group
chatIdChat identifier
sendingStateInformation about the sending state of the message; may be null
schedulingStateInformation about the scheduling state of the message; may be null
isOutgoingTrue, if the message is outgoing
canBeEditedTrue, 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 client
canBeForwardedTrue, if the message can be forwarded
canBeDeletedOnlyForSelfTrue, if the message can be deleted only for the current user while other users will continue to see it
canBeDeletedForAllUsersTrue, if the message can be deleted for all users
isChannelPostTrue, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts
containsUnreadMentionTrue, if the message contains an unread mention for the current user
datePoint in time (Unix timestamp) when the message was sent
editDatePoint in time (Unix timestamp) when the message was last edited
forwardInfoInformation about the initial message sender; may be null
replyToMessageIdIf non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message
ttlFor self-destructing messages, the message’s TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires
ttlExpiresInTime left before the message expires, in seconds
viaBotUserIdIf non-zero, the user identifier of the bot through which this message was sent
authorSignatureFor channel posts, optional author signature
viewsNumber of times this message was viewed
mediaAlbumIdUnique identifier of an album this message belongs to. Only photos and videos can be grouped together in albums
restrictionReasonIf non-empty, contains a human-readable description of the reason why access to this message must be restricted
contentContent of the message
replyMarkupReply markup for the message; may be null
View on GitHub
Install in Dash
Message Structure Reference