Inherits MessageContent.
A regular gift was received or sent by the current user, or the current user was notified about a channel gift.
Public Fields | |
| object_ptr< gift > | gift_ |
| The gift. | |
| object_ptr< MessageSender > | sender_id_ |
| Sender of the gift; may be null for outgoing messages about prepaid upgrade of gifts from unknown users. | |
| object_ptr< MessageSender > | receiver_id_ |
| Receiver of the gift. | |
| string | received_gift_id_ |
| Unique identifier of the received gift for the current user; only for the receiver of the gift. | |
| object_ptr< formattedText > | text_ |
| Message added to the gift. | |
| int53 | sell_star_count_ |
| Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the receiver. | |
| int53 | prepaid_upgrade_star_count_ |
| Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift. | |
| bool | is_upgrade_separate_ |
| True, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost. | |
| bool | is_private_ |
| True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them. | |
| bool | is_saved_ |
| True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift. | |
| bool | is_prepaid_upgrade_ |
| True, if the message is about prepaid upgrade of the gift by another user. | |
| bool | can_be_upgraded_ |
| True, if the gift can be upgraded to a unique gift; only for the receiver of the gift. | |
| bool | was_converted_ |
| True, if the gift was converted to Telegram Stars; only for the receiver of the gift. | |
| bool | was_upgraded_ |
| True, if the gift was upgraded to a unique gift. | |
| bool | was_refunded_ |
| True, if the gift was refunded and isn't available anymore. | |
| string | upgraded_received_gift_id_ |
| Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift. | |
| string | prepaid_upgrade_hash_ |
| If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade. | |
Public Instance Methods | |
| messageGift () | |
| messageGift (object_ptr< gift > &&gift_, object_ptr< MessageSender > &&sender_id_, object_ptr< MessageSender > &&receiver_id_, string const &received_gift_id_, object_ptr< formattedText > &&text_, int53 sell_star_count_, int53 prepaid_upgrade_star_count_, bool is_upgrade_separate_, bool is_private_, bool is_saved_, bool is_prepaid_upgrade_, bool can_be_upgraded_, bool was_converted_, bool was_upgraded_, bool was_refunded_, string const &upgraded_received_gift_id_, string const &prepaid_upgrade_hash_) | |
| void | store (TlStorerToString &s, const char *field_name) const final |
Public Instance Methods inherited from TlObject | |
| virtual void | store (TlStorerUnsafe &s) const |
| virtual void | store (TlStorerCalcLength &s) const |
| TlObject ()=default | |
| TlObject (const TlObject &)=delete | |
| TlObject & | operator= (const TlObject &)=delete |
| TlObject (TlObject &&)=default | |
| TlObject & | operator= (TlObject &&)=default |
| virtual | ~TlObject ()=default |
Static Public Attributes | |
| static const std::int32_t | ID = -1553135178 |
| Identifier uniquely determining a type of the object. | |
| messageGift | ( | ) |
A regular gift was received or sent by the current user, or the current user was notified about a channel gift.
| messageGift | ( | object_ptr< gift > && | gift_, |
| object_ptr< MessageSender > && | sender_id_, | ||
| object_ptr< MessageSender > && | receiver_id_, | ||
| string const & | received_gift_id_, | ||
| object_ptr< formattedText > && | text_, | ||
| int53 | sell_star_count_, | ||
| int53 | prepaid_upgrade_star_count_, | ||
| bool | is_upgrade_separate_, | ||
| bool | is_private_, | ||
| bool | is_saved_, | ||
| bool | is_prepaid_upgrade_, | ||
| bool | can_be_upgraded_, | ||
| bool | was_converted_, | ||
| bool | was_upgraded_, | ||
| bool | was_refunded_, | ||
| string const & | upgraded_received_gift_id_, | ||
| string const & | prepaid_upgrade_hash_ | ||
| ) |
A regular gift was received or sent by the current user, or the current user was notified about a channel gift.
| [in] | gift_ | The gift. |
| [in] | sender_id_ | Sender of the gift; may be null for outgoing messages about prepaid upgrade of gifts from unknown users. |
| [in] | receiver_id_ | Receiver of the gift. |
| [in] | received_gift_id_ | Unique identifier of the received gift for the current user; only for the receiver of the gift. |
| [in] | text_ | Message added to the gift. |
| [in] | sell_star_count_ | Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the receiver. |
| [in] | prepaid_upgrade_star_count_ | Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift. |
| [in] | is_upgrade_separate_ | True, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost. |
| [in] | is_private_ | True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them. |
| [in] | is_saved_ | True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift. |
| [in] | is_prepaid_upgrade_ | True, if the message is about prepaid upgrade of the gift by another user. |
| [in] | can_be_upgraded_ | True, if the gift can be upgraded to a unique gift; only for the receiver of the gift. |
| [in] | was_converted_ | True, if the gift was converted to Telegram Stars; only for the receiver of the gift. |
| [in] | was_upgraded_ | True, if the gift was upgraded to a unique gift. |
| [in] | was_refunded_ | True, if the gift was refunded and isn't available anymore. |
| [in] | upgraded_received_gift_id_ | Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift. |
| [in] | prepaid_upgrade_hash_ | If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade. |
|
finalvirtual |