Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package telegram-desktop for 
openSUSE:Factory checked in at 2026-01-12 12:11:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/telegram-desktop (Old)
 and      /work/SRC/openSUSE:Factory/.telegram-desktop.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "telegram-desktop"

Mon Jan 12 12:11:01 2026 rev:143 rq:1326667 version:6.4.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/telegram-desktop/telegram-desktop.changes        
2026-01-06 17:46:10.465551697 +0100
+++ 
/work/SRC/openSUSE:Factory/.telegram-desktop.new.1928/telegram-desktop.changes  
    2026-01-12 12:11:03.606123820 +0100
@@ -1,0 +2,8 @@
+Sun Jan 11 20:19:44 UTC 2026 - Илья Индиго <[email protected]>
+
+- Updated ada to 3.4.1.
+- Updated td to git20260108.
+- Updated telegram-desktop to 6.4.2
+  * https://github.com/telegramdesktop/tdesktop/releases/tag/v6.4.2
+
+-------------------------------------------------------------------

Old:
----
  ada-3.3.0.tar.gz
  td-git20260103.tar.xz
  tdesktop-6.4.1-full.tar.gz

New:
----
  ada-3.4.1.tar.gz
  td-git20260108.tar.xz
  tdesktop-6.4.2-full.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ telegram-desktop.spec ++++++
--- /var/tmp/diff_new_pack.Nlrfw6/_old  2026-01-12 12:11:05.002182006 +0100
+++ /var/tmp/diff_new_pack.Nlrfw6/_new  2026-01-12 12:11:05.006182174 +0100
@@ -20,12 +20,12 @@
 # 
https://github.com/telegramdesktop/tdesktop/blob/8fab9167beb2407c1153930ed03a4badd0c2b59f/snap/snapcraft.yaml#L87-L88
 %define api_id    611335
 %define api_hash  d524b414d21f4d37f08684c1df41ac9c
-%define ada_ver   3.3.0
+%define ada_ver   3.4.1
 %define h264_ver  2.6.0
 %define owt_ver   git20251128
-%define td_ver    git20260103
+%define td_ver    git20260108
 Name:           telegram-desktop
-Version:        6.4.1
+Version:        6.4.2
 Release:        0
 Summary:        Messaging application with a focus on speed and security
 License:        GPL-3.0-only

++++++ ada-3.3.0.tar.gz -> ada-3.4.1.tar.gz ++++++
++++ 8411 lines of diff (skipped)

++++++ td-git20260103.tar.xz -> td-git20260108.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/td-git20260103/CMakeLists.txt 
new/td-git20260108/CMakeLists.txt
--- old/td-git20260103/CMakeLists.txt   2026-01-05 15:26:26.257262668 +0100
+++ new/td-git20260108/CMakeLists.txt   2026-01-11 21:15:04.087487869 +0100
@@ -119,10 +119,9 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
   endif()
 
-  if (TD_ENABLE_JNI)
-    # https://github.com/tdlib/td/issues/2912
-    add_definitions(-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
-  endif()
+  # https://github.com/tdlib/td/issues/2912
+  # https://github.com/tdlib/td/issues/3202
+  add_definitions(-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
 endif()
 
 if (CLANG OR GCC)
@@ -512,6 +511,7 @@
   td/telegram/MessageSearchOffset.cpp
   td/telegram/MessageSelfDestructType.cpp
   td/telegram/MessageSender.cpp
+  td/telegram/MessageSendOptions.cpp
   td/telegram/MessagesInfo.cpp
   td/telegram/MessagesManager.cpp
   td/telegram/MessageSource.cpp
@@ -894,6 +894,7 @@
   td/telegram/MessageSearchOffset.h
   td/telegram/MessageSelfDestructType.h
   td/telegram/MessageSender.h
+  td/telegram/MessageSendOptions.h
   td/telegram/MessagesInfo.h
   td/telegram/MessagesManager.h
   td/telegram/MessageSource.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/td-git20260103/SplitSource.php 
new/td-git20260108/SplitSource.php
--- old/td-git20260103/SplitSource.php  2026-01-05 15:26:26.261262643 +0100
+++ new/td-git20260108/SplitSource.php  2026-01-11 21:15:04.091487836 +0100
@@ -379,13 +379,14 @@
             'MessageFullId' => 'MessageFullId',
             'MessageId' => 'MessageId',
             'message_import_manager[_(-](?![.]get[(][)])|MessageImportManager' 
=> 'MessageImportManager',
-            'message_query_manager[_(-](?![.]get[(][)])|MessageQueryManager' 
=> 'MessageQueryManager',
             'MessageLinkInfo' => 'MessageLinkInfo',
+            'message_query_manager[_(-](?![.]get[(][)])|MessageQueryManager' 
=> 'MessageQueryManager',
             'MessageQuote' => 'MessageQuote',
             
'MessageReaction|UnreadMessageReaction|[a-z_]*message[a-z_]*reaction|reload_paid_reaction_privacy|get_chosen_tags'
 => 'MessageReaction',
             'MessageReactor' => 'MessageReactor',
             'MessageSearchOffset' => 'MessageSearchOffset',
             '[a-z_]*_message_sender' => 'MessageSender',
+            'MessageSendOptions' => 'MessageSendOptions',
             'messages_manager[_(-](?![.]get[(][)])|MessagesManager' => 
'MessagesManager',
             'MessageThreadInfo' => 'MessageThreadInfo',
             'MessageTopic' => 'MessageTopic',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/td-git20260103/td/generate/scheme/td_api.tl 
new/td-git20260108/td/generate/scheme/td_api.tl
--- old/td-git20260103/td/generate/scheme/td_api.tl     2026-01-05 
15:26:26.623260363 +0100
+++ new/td-git20260108/td/generate/scheme/td_api.tl     2026-01-11 
21:15:04.460484786 +0100
@@ -557,7 +557,7 @@
 
 //@description Describes state of the stake dice
 //@state_hash Hash of the state to use for sending the next dice; may be empty 
if the stake dice can't be sent by the current user
-//@stake_toncoin_amount The amount of Toncoins that was staked in the previous 
roll; in the smallest units of the currency
+//@stake_toncoin_amount The Toncoin amount that was staked in the previous 
roll; in the smallest units of the currency
 //@suggested_stake_toncoin_amounts The amounts of Toncoins that are suggested 
to be staked; in the smallest units of the currency
 //@current_streak The number of rolled sixes towards the streak; 0-2
 //@prize_per_mille The number of Toncoins received by the user for each 1000 
Toncoins staked if the dice outcome is 1-6 correspondingly; may be empty if the 
stake dice can't be sent by the current user
@@ -783,7 +783,7 @@
 //@can_edit_bio True, if the bot can edit bio of the business account
 //@can_edit_profile_photo True, if the bot can edit profile photo of the 
business account
 //@can_edit_username True, if the bot can edit username of the business account
-//@can_view_gifts_and_stars True, if the bot can view gifts and amount of 
Telegram Stars owned by the business account
+//@can_view_gifts_and_stars True, if the bot can view gifts and Telegram Star 
amount owned by the business account
 //@can_sell_gifts True, if the bot can sell regular gifts received by the 
business account
 //@can_change_gift_settings True, if the bot can change gift receiving 
settings of the business account
 //@can_transfer_and_upgrade_gifts True, if the bot can transfer and upgrade 
gifts received by the business account
@@ -947,7 +947,7 @@
 //@class GiftResalePrice @description Describes price of a resold gift
 
 //@description Describes price of a resold gift in Telegram Stars
-//@star_count The amount of Telegram Stars expected to be paid for the gift. 
Must be in the range
+//@star_count The Telegram Star amount expected to be paid for the gift. Must 
be in the range
 
//-getOption("gift_resale_star_count_min")-getOption("gift_resale_star_count_max")
 for gifts put for resale
 giftResalePriceStar star_count:int53 = GiftResalePrice;
 
@@ -972,7 +972,7 @@
 //@class SuggestedPostPrice @description Describes price of a suggested post
 
 //@description Describes price of a suggested post in Telegram Stars
-//@star_count The amount of Telegram Stars expected to be paid for the post; 
getOption("suggested_post_star_count_min")-getOption("suggested_post_star_count_max")
+//@star_count The Telegram Star amount expected to be paid for the post; 
getOption("suggested_post_star_count_min")-getOption("suggested_post_star_count_max")
 suggestedPostPriceStar star_count:int53 = SuggestedPostPrice;
 
 //@description Describes price of a suggested post in Toncoins
@@ -1018,8 +1018,8 @@
 suggestedPostRefundReasonPaymentRefunded = SuggestedPostRefundReason;
 
 
-//@description Describes a possibly non-integer amount of Telegram Stars
-//@star_count The integer amount of Telegram Stars rounded to 0
+//@description Describes a possibly non-integer Telegram Star amount
+//@star_count The integer Telegram Star amount rounded to 0
 //@nanostar_count The number of 1/1000000000 shares of Telegram Stars; from 
-999999999 to 999999999
 starAmount star_count:int53 nanostar_count:int32 = StarAmount;
 
@@ -1041,7 +1041,7 @@
 
 //@description Describes subscription plan paid in Telegram Stars
 //@period The number of seconds between consecutive Telegram Star debiting
-//@star_count The amount of Telegram Stars that must be paid for each period
+//@star_count The Telegram Star amount that must be paid for each period
 starSubscriptionPricing period:int32 star_count:int53 = 
StarSubscriptionPricing;
 
 //@description Contains information about subscription to a channel chat, a 
bot, or a business account that was paid in Telegram Stars
@@ -1102,7 +1102,7 @@
 //@description Contains information about an affiliate that received 
commission from a Telegram Star transaction
 //@commission_per_mille The number of Telegram Stars received by the affiliate 
for each 1000 Telegram Stars received by the program owner
 //@affiliate_chat_id Identifier of the chat which received the commission
-//@star_amount The amount of Telegram Stars that were received by the 
affiliate; can be negative for refunds
+//@star_amount The Telegram Star amount that was received by the affiliate; 
can be negative for refunds
 affiliateInfo commission_per_mille:int32 affiliate_chat_id:int53 
star_amount:starAmount = AffiliateInfo;
 
 //@description Describes a found affiliate program
@@ -1159,7 +1159,7 @@
 //@description Describes an option for gifting Telegram Premium to a user. Use 
telegramPaymentPurposePremiumGift for out-of-store payments or payments in 
Telegram Stars
 //@currency ISO 4217 currency code for the payment
 //@amount The amount to pay, in the smallest units of the currency
-//@star_count The alternative amount of Telegram Stars to pay; 0 if payment in 
Telegram Stars is not possible
+//@star_count The alternative Telegram Star amount to pay; 0 if payment in 
Telegram Stars is not possible
 //@discount_percentage The discount associated with this option, as a 
percentage
 //@month_count Number of months the Telegram Premium subscription will be 
active
 //@store_product_id Identifier of the store product associated with the option
@@ -1401,7 +1401,7 @@
 //@value Estimated value of the gift; in the smallest units of the currency
 //@is_value_average True, if the value is calculated as average value of 
similar sold gifts. Otherwise, it is based on the sale price of the gift
 //@initial_sale_date Point in time (Unix timestamp) when the corresponding 
regular gift was originally purchased
-//@initial_sale_star_count Amount of Telegram Stars that were paid for the gift
+//@initial_sale_star_count The Telegram Star amount that was paid for the gift
 //@initial_sale_price Initial price of the gift; in the smallest units of the 
currency
 //@last_sale_date Point in time (Unix timestamp) when the upgraded gift was 
purchased last time; 0 if never
 //@last_sale_price Last purchase price of the gift; in the smallest units of 
the currency; 0 if the gift has never been resold
@@ -1438,7 +1438,7 @@
 
 //@description Describes a price required to pay to upgrade a gift
 //@date Point in time (Unix timestamp) when the price will be in effect
-//@star_count The amount of Telegram Stars required to pay to upgrade the gift
+//@star_count The Telegram Star amount required to pay to upgrade the gift
 giftUpgradePrice date:int32 star_count:int53 = GiftUpgradePrice;
 
 
@@ -1761,7 +1761,7 @@
 //@user_id Identifier of the user that bought the gift
 //@gift The gift
 //@commission_per_mille The number of Telegram Stars received by the Telegram 
for each 1000 Telegram Stars received by the seller of the gift
-//@commission_star_amount The amount of Telegram Stars that were received by 
Telegram; can be negative for refunds
+//@commission_star_amount The Telegram Star amount that was received by 
Telegram; can be negative for refunds
 //@via_offer True, if the gift was sold through a purchase offer
 starTransactionTypeUpgradedGiftSale user_id:int53 gift:upgradedGift 
commission_per_mille:int32 commission_star_amount:starAmount via_offer:Bool = 
StarTransactionType;
 
@@ -1787,7 +1787,7 @@
 //@sender_id Identifier of the sender of the message
 //@message_count Number of received paid messages
 //@commission_per_mille The number of Telegram Stars received by the Telegram 
for each 1000 Telegram Stars paid for message sending
-//@commission_star_amount The amount of Telegram Stars that were received by 
Telegram; can be negative for refunds
+//@commission_star_amount The Telegram Star amount that was received by 
Telegram; can be negative for refunds
 starTransactionTypePaidMessageReceive sender_id:MessageSender 
message_count:int32 commission_per_mille:int32 
commission_star_amount:starAmount = StarTransactionType;
 
 //@description The transaction is a sending of a paid group call message; 
relevant for regular users only @chat_id Identifier of the chat that received 
the payment
@@ -1796,7 +1796,7 @@
 //@description The transaction is a receiving of a paid group call message; 
relevant for regular users and channel chats only
 //@sender_id Identifier of the sender of the message
 //@commission_per_mille The number of Telegram Stars received by the Telegram 
for each 1000 Telegram Stars paid for message sending
-//@commission_star_amount The amount of Telegram Stars that were received by 
Telegram; can be negative for refunds
+//@commission_star_amount The Telegram Star amount that was received by 
Telegram; can be negative for refunds
 starTransactionTypePaidGroupCallMessageReceive sender_id:MessageSender 
commission_per_mille:int32 commission_star_amount:starAmount = 
StarTransactionType;
 
 //@description The transaction is a sending of a paid group reaction; relevant 
for regular users only @chat_id Identifier of the chat that received the payment
@@ -1805,7 +1805,7 @@
 //@description The transaction is a receiving of a paid group call reaction; 
relevant for regular users and channel chats only
 //@sender_id Identifier of the sender of the reaction
 //@commission_per_mille The number of Telegram Stars received by the Telegram 
for each 1000 Telegram Stars paid for reaction sending
-//@commission_star_amount The amount of Telegram Stars that were received by 
Telegram; can be negative for refunds
+//@commission_star_amount The Telegram Star amount that was received by 
Telegram; can be negative for refunds
 starTransactionTypePaidGroupCallReactionReceive sender_id:MessageSender 
commission_per_mille:int32 commission_star_amount:starAmount = 
StarTransactionType;
 
 //@description The transaction is a payment for a suggested post; relevant for 
regular users only
@@ -1873,7 +1873,7 @@
 //@user_id Identifier of the user that bought the gift
 //@gift The gift
 //@commission_per_mille The number of Toncoins received by the Telegram for 
each 1000 Toncoins received by the seller of the gift
-//@commission_toncoin_amount The amount of Toncoins that were received by the 
Telegram; in the smallest units of the currency
+//@commission_toncoin_amount The Toncoin amount that was received by the 
Telegram; in the smallest units of the currency
 //@via_offer True, if the gift was sold through a purchase offer
 tonTransactionTypeUpgradedGiftSale user_id:int53 gift:upgradedGift 
commission_per_mille:int32 commission_toncoin_amount:int53 via_offer:Bool = 
TonTransactionType;
 
@@ -1943,7 +1943,7 @@
 //@winner_count Number of winners in the giveaway
 //@activation_count Number of winners, which activated their gift codes; for 
Telegram Premium giveaways only
 //@gift_code Telegram Premium gift code that was received by the current user; 
empty if the user isn't a winner in the giveaway or the giveaway isn't a 
Telegram Premium giveaway
-//@won_star_count The amount of Telegram Stars won by the current user; 0 if 
the user isn't a winner in the giveaway or the giveaway isn't a Telegram Star 
giveaway
+//@won_star_count The Telegram Star amount won by the current user; 0 if the 
user isn't a winner in the giveaway or the giveaway isn't a Telegram Star 
giveaway
 giveawayInfoCompleted creation_date:int32 actual_winners_selection_date:int32 
was_refunded:Bool is_winner:Bool winner_count:int32 activation_count:int32 
gift_code:string won_star_count:int53 = GiveawayInfo;
 
 
@@ -4639,8 +4639,8 @@
 //@initial_state The animated stickers with the initial dice animation; may be 
null if unknown. The update updateMessageContent will be sent when the sticker 
became known
 //@final_state The animated stickers with the final dice animation; may be 
null if unknown. The update updateMessageContent will be sent when the sticker 
became known
 //@value The dice value. If the value is 0, then the dice don't have final 
state yet
-//@stake_toncoin_amount The amount of Toncoins that were staked; in the 
smallest units of the currency
-//@prize_toncoin_amount The amount of Toncoins that were gained from the roll; 
in the smallest units of the currency; -1 if the dice don't have final state yet
+//@stake_toncoin_amount The Toncoin amount that was staked; in the smallest 
units of the currency
+//@prize_toncoin_amount The Toncoin amount that was gained from the roll; in 
the smallest units of the currency; -1 if the dice don't have final state yet
 messageStakeDice initial_state:DiceStickers final_state:DiceStickers 
value:int32 stake_toncoin_amount:int53 prize_toncoin_amount:int53 = 
MessageContent;
 
 //@description A message with a forwarded story
@@ -4881,7 +4881,7 @@
 //@description Toncoins were gifted to a user
 //@gifter_user_id The identifier of a user that gifted Toncoins; 0 if the gift 
was anonymous or is outgoing
 //@receiver_user_id The identifier of a user that received Toncoins; 0 if the 
gift is incoming
-//@ton_amount The received amount of Toncoins, in the smallest units of the 
cryptocurrency
+//@ton_amount The received Toncoin amount, in the smallest units of the 
cryptocurrency
 //@transaction_id Identifier of the transaction for Toncoin credit; for 
receiver only
 //@sticker A sticker to be shown in the message; may be null if unknown
 messageGiftedTon gifter_user_id:int53 receiver_user_id:int53 ton_amount:int53 
transaction_id:string sticker:sticker = MessageContent;
@@ -5327,7 +5327,7 @@
 
 //@description A stake dice message
 //@state_hash Hash of the stake dice state. The state hash can be used only if 
it was received recently enough. Otherwise, a new state must be requested using 
getStakeDiceState
-//@stake_toncoin_amount The amount of Toncoins that will be staked; in the 
smallest units of the currency. Must be in the range
+//@stake_toncoin_amount The Toncoin amount that will be staked; in the 
smallest units of the currency. Must be in the range
 
//-getOption("stake_dice_stake_amount_min")-getOption("stake_dice_stake_amount_max")
 //@clear_draft True, if the chat message draft must be deleted
 inputMessageStakeDice state_hash:string stake_toncoin_amount:int53 
clear_draft:Bool = InputMessageContent;
@@ -9159,9 +9159,9 @@
 
 
 //@description Contains information about Telegram Stars earned by a user or a 
chat
-//@total_amount Total amount of Telegram Stars earned
-//@current_amount The amount of Telegram Stars that aren't withdrawn yet
-//@available_amount The amount of Telegram Stars that are available for 
withdrawal
+//@total_amount Total Telegram Star amount earned
+//@current_amount The Telegram Star amount that isn't withdrawn yet
+//@available_amount The Telegram Star amount that is available for withdrawal
 //@withdrawal_enabled True, if Telegram Stars can be withdrawn now or later
 //@next_withdrawal_in Time left before the next withdrawal can be started, in 
seconds; 0 if withdrawal can be started now
 starRevenueStatus total_amount:starAmount current_amount:starAmount 
available_amount:starAmount withdrawal_enabled:Bool next_withdrawal_in:int32 = 
StarRevenueStatus;
@@ -9173,9 +9173,9 @@
 starRevenueStatistics revenue_by_day_graph:StatisticalGraph 
status:starRevenueStatus usd_rate:double = StarRevenueStatistics;
 
 //@description Contains information about Toncoins earned by the current user
-//@total_amount Total amount of Toncoins earned; in the smallest units of the 
cryptocurrency
-//@balance_amount Amount of Toncoins that aren't withdrawn yet; in the 
smallest units of the cryptocurrency
-//@available_amount Amount of Toncoins that are available for withdrawal; in 
the smallest units of the cryptocurrency
+//@total_amount Total Toncoin amount earned; in the smallest units of the 
cryptocurrency
+//@balance_amount The Toncoin amount that isn't withdrawn yet; in the smallest 
units of the cryptocurrency
+//@available_amount The Toncoin amount that is available for withdrawal; in 
the smallest units of the cryptocurrency
 //@withdrawal_enabled True, if Toncoins can be withdrawn
 tonRevenueStatus total_amount:int64 balance_amount:int64 
available_amount:int64 withdrawal_enabled:Bool = TonRevenueStatus;
 
@@ -10644,7 +10644,7 @@
 //@query Query to search for
 //@offset Offset of the first entry to return as received from the previous 
request; use empty string to get the first chunk of results
 //@limit The maximum number of messages to be returned; up to 100. For optimal 
performance, the number of returned messages is chosen by TDLib and can be 
smaller than the specified limit
-//@star_count The amount of Telegram Stars the user agreed to pay for the 
search; pass 0 for free searches
+//@star_count The Telegram Star amount the user agreed to pay for the search; 
pass 0 for free searches
 searchPublicPosts query:string offset:string limit:int32 star_count:int53 = 
FoundPublicPosts;
 
 //@description Searches for public channel posts containing the given hashtag 
or cashtag. For optimal performance, the number of returned messages is chosen 
by TDLib and can be smaller than the specified limit
@@ -11155,7 +11155,7 @@
 //@settings The new settings
 setBusinessAccountGiftSettings business_connection_id:string 
settings:giftSettings = Ok;
 
-//@description Returns the amount of Telegram Stars owned by a business 
account; for bots only @business_connection_id Unique identifier of business 
connection
+//@description Returns the Telegram Star amount owned by a business account; 
for bots only @business_connection_id Unique identifier of business connection
 getBusinessAccountStarAmount business_connection_id:string = StarAmount;
 
 //@description Transfers Telegram Stars from the business account to the 
business bot; for bots only
@@ -13761,25 +13761,25 @@
 //@business_connection_id Unique identifier of business connection on behalf 
of which to send the request; for bots only
 //@received_gift_id Identifier of the gift
 //@keep_original_details Pass true to keep the original gift text, sender and 
receiver in the upgraded gift
-//@star_count The amount of Telegram Stars required to pay for the upgrade. It 
the gift has prepaid_upgrade_star_count > 0, then pass 0, otherwise, pass 
gift.upgrade_star_count
+//@star_count The Telegram Star amount required to pay for the upgrade. It the 
gift has prepaid_upgrade_star_count > 0, then pass 0, otherwise, pass 
gift.upgrade_star_count
 upgradeGift business_connection_id:string received_gift_id:string 
keep_original_details:Bool star_count:int53 = UpgradeGiftResult;
 
 //@description Pays for upgrade of a regular gift that is owned by another 
user or channel chat
 //@owner_id Identifier of the user or the channel chat that owns the gift
 //@prepaid_upgrade_hash Prepaid upgrade hash as received along with the gift
-//@star_count The amount of Telegram Stars the user agreed to pay for the 
upgrade; must be equal to gift.upgrade_star_count
+//@star_count The Telegram Star amount the user agreed to pay for the upgrade; 
must be equal to gift.upgrade_star_count
 buyGiftUpgrade owner_id:MessageSender prepaid_upgrade_hash:string 
star_count:int53 = Ok;
 
 //@description Sends an upgraded gift to another user or channel chat
 //@business_connection_id Unique identifier of business connection on behalf 
of which to send the request; for bots only
 //@received_gift_id Identifier of the gift
 //@new_owner_id Identifier of the user or the channel chat that will receive 
the gift
-//@star_count The amount of Telegram Stars required to pay for the transfer
+//@star_count The Telegram Star amount required to pay for the transfer
 transferGift business_connection_id:string received_gift_id:string 
new_owner_id:MessageSender star_count:int53 = Ok;
 
 //@description Drops original details for an upgraded gift
 //@received_gift_id Identifier of the gift
-//@star_count The amount of Telegram Stars required to pay for the operation
+//@star_count The Telegram Star amount required to pay for the operation
 dropGiftOriginalDetails received_gift_id:string star_count:int53 = Ok;
 
 //@description Sends an upgraded gift that is available for resale to another 
user or channel chat; gifts already owned by the current user
@@ -14017,7 +14017,7 @@
 //@refund_payments Pass true to refund the user previously paid messages
 allowUnpaidMessagesFromUser user_id:int53 refund_payments:Bool = Ok;
 
-//@description Changes the amount of Telegram Stars that must be paid to send 
a message to a supergroup chat; requires can_restrict_members administrator 
right and supergroupFullInfo.can_enable_paid_messages
+//@description Changes the Telegram Star amount that must be paid to send a 
message to a supergroup chat; requires can_restrict_members administrator right 
and supergroupFullInfo.can_enable_paid_messages
 //@chat_id Identifier of the supergroup chat
 //@paid_message_star_count The new number of Telegram Stars that must be paid 
for each message that is sent to the supergroup chat unless the sender is an 
administrator of the chat; 0-getOption("paid_message_star_count_max").
 //-The supergroup will receive getOption("paid_message_earnings_per_mille") 
Telegram Stars for each 1000 Telegram Stars paid for message sending
@@ -14484,7 +14484,7 @@
 //@url The referral link of the affiliate program
 disconnectAffiliateProgram affiliate:AffiliateType url:string = 
ConnectedAffiliateProgram;
 
-//@description Returns an affiliate program that were connected to the given 
affiliate by identifier of the bot that created the program
+//@description Returns an affiliate program that was connected to the given 
affiliate by identifier of the bot that created the program
 //@affiliate The affiliate to which the affiliate program will be connected
 //@bot_user_id Identifier of the bot that created the program
 getConnectedAffiliateProgram affiliate:AffiliateType bot_user_id:int53 = 
ConnectedAffiliateProgram;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/td-git20260103/td/telegram/MessageSendOptions.cpp 
new/td-git20260108/td/telegram/MessageSendOptions.cpp
--- old/td-git20260103/td/telegram/MessageSendOptions.cpp       1970-01-01 
01:00:00.000000000 +0100
+++ new/td-git20260108/td/telegram/MessageSendOptions.cpp       2026-01-11 
21:15:04.719482645 +0100
@@ -0,0 +1,181 @@
+//
+// Copyright Aliaksei Levin ([email protected]), Arseny Smirnov 
([email protected]) 2014-2026
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+#include "td/telegram/MessageSendOptions.h"
+
+#include "td/telegram/AuthManager.h"
+#include "td/telegram/DialogManager.h"
+#include "td/telegram/Global.h"
+#include "td/telegram/MessageContent.h"
+#include "td/telegram/MessageContentType.h"
+#include "td/telegram/StarManager.h"
+#include "td/telegram/Td.h"
+
+namespace td {
+
+Result<std::pair<int32, int32>> MessageSendOptions::get_message_schedule_date(
+    td_api::object_ptr<td_api::MessageSchedulingState> &&scheduling_state, 
bool allow_repeat_period) {
+  if (scheduling_state == nullptr) {
+    return std::make_pair(0, 0);
+  }
+
+  switch (scheduling_state->get_id()) {
+    case td_api::messageSchedulingStateSendWhenVideoProcessed::ID:
+      return Status::Error(400, "Can't force video processing");
+    case td_api::messageSchedulingStateSendWhenOnline::ID: {
+      auto send_date = SCHEDULE_WHEN_ONLINE_DATE;
+      return std::make_pair(send_date, 0);
+    }
+    case td_api::messageSchedulingStateSendAtDate::ID: {
+      auto send_at_date = 
td_api::move_object_as<td_api::messageSchedulingStateSendAtDate>(scheduling_state);
+      auto send_date = send_at_date->send_date_;
+      if (send_date <= 0) {
+        return Status::Error(400, "Invalid send date specified");
+      }
+      if (send_date <= G()->unix_time() + 10) {
+        return std::make_pair(0, 0);
+      }
+      if (send_date - G()->unix_time() > 367 * 86400) {
+        return Status::Error(400, "Send date is too far in the future");
+      }
+      auto repeat_period = send_at_date->repeat_period_;
+      if (!allow_repeat_period && repeat_period != 0) {
+        return Status::Error(400, "Repeated scheduled messages aren't 
supported");
+      }
+      if (repeat_period != 0 && repeat_period != 86400 && repeat_period != 7 * 
86400 && repeat_period != 14 * 86400 &&
+          repeat_period != 30 * 86400 && repeat_period != 91 * 86400 && 
repeat_period != 182 * 86400 &&
+          repeat_period != 365 * 86400) {
+        if (!G()->is_test_dc() || (repeat_period != 60 && repeat_period != 
300)) {
+          return Status::Error(400, "Invalid message repeat period specified");
+        }
+      }
+      return std::make_pair(send_date, repeat_period);
+    }
+    default:
+      UNREACHABLE();
+      return std::make_pair(0, 0);
+  }
+}
+
+td_api::object_ptr<td_api::MessageSchedulingState> 
MessageSendOptions::get_message_scheduling_state_object(
+    int32 send_date, int32 repeat_period, bool video_processing_pending) {
+  if (video_processing_pending) {
+    return 
td_api::make_object<td_api::messageSchedulingStateSendWhenVideoProcessed>(send_date);
+  }
+  if (send_date == SCHEDULE_WHEN_ONLINE_DATE) {
+    return td_api::make_object<td_api::messageSchedulingStateSendWhenOnline>();
+  }
+  return 
td_api::make_object<td_api::messageSchedulingStateSendAtDate>(send_date, 
repeat_period);
+}
+
+Status MessageSendOptions::check_paid_message_star_count(Td *td, int64 
&paid_message_star_count, int32 message_count) {
+  if (paid_message_star_count < 0 || paid_message_star_count > 1000000) {
+    return Status::Error(400, "Invalid price for paid message specified");
+  }
+  CHECK(message_count > 0);
+  if (paid_message_star_count % message_count != 0) {
+    return Status::Error(400, "Invalid price for paid messages specified");
+  }
+  if (paid_message_star_count > 0 && 
!td->star_manager_->has_owned_star_count(paid_message_star_count)) {
+    return Status::Error(400, "Have not enough Telegram Stars");
+  }
+  paid_message_star_count /= message_count;
+  return Status::OK();
+}
+
+Result<MessageSendOptions> MessageSendOptions::get_message_send_options(
+    Td *td, DialogId dialog_id, td_api::object_ptr<td_api::messageSendOptions> 
&&options,
+    bool allow_update_stickersets_order, bool allow_effect, bool 
allow_suggested_post, bool allow_repeat_period,
+    int32 message_count) {
+  MessageSendOptions result;
+  if (options == nullptr) {
+    return std::move(result);
+  }
+
+  result.disable_notification = options->disable_notification_;
+  result.from_background = options->from_background_;
+  if (allow_update_stickersets_order) {
+    result.update_stickersets_order = 
options->update_order_of_installed_sticker_sets_;
+  }
+  if (td->auth_manager_->is_bot()) {
+    result.protect_content = options->protect_content_;
+    result.allow_paid = options->allow_paid_broadcast_;
+  } else {
+    result.paid_message_star_count = options->paid_message_star_count_;
+    TRY_STATUS(check_paid_message_star_count(td, 
result.paid_message_star_count, message_count));
+  }
+  result.only_preview = options->only_preview_;
+  TRY_RESULT(schedule_date, 
get_message_schedule_date(std::move(options->scheduling_state_), 
allow_repeat_period));
+  result.schedule_date = schedule_date.first;
+  result.schedule_repeat_period = schedule_date.second;
+  result.sending_id = options->sending_id_;
+
+  if (result.schedule_date != 0) {
+    auto dialog_type = dialog_id.get_type();
+    if (dialog_type == DialogType::SecretChat) {
+      return Status::Error(400, "Can't schedule messages in secret chats");
+    }
+    if (td->auth_manager_->is_bot()) {
+      return Status::Error(400, "Bots can't send scheduled messages");
+    }
+
+    if (result.schedule_date == SCHEDULE_WHEN_ONLINE_DATE) {
+      if (dialog_type != DialogType::User) {
+        return Status::Error(400, "Messages can be scheduled till online only 
in private chats");
+      }
+      if (dialog_id == td->dialog_manager_->get_my_dialog_id()) {
+        return Status::Error(400, "Can't scheduled till online messages in 
chat with self");
+      }
+    }
+    if (result.paid_message_star_count > 0) {
+      return Status::Error(400, "Can't schedule paid messages");
+    }
+    if (td->dialog_manager_->is_admined_monoforum_channel(dialog_id)) {
+      return Status::Error(400, "Can't schedule messages in channel direct 
messages chats");
+    }
+  }
+  if (options->effect_id_ != 0) {
+    auto dialog_type = dialog_id.get_type();
+    if (dialog_type != DialogType::User) {
+      return Status::Error(400, "Can't use message effects in the chat");
+    }
+    if (!allow_effect) {
+      return Status::Error(400, "Can't use message effects in the method");
+    }
+    result.effect_id = MessageEffectId(options->effect_id_);
+  }
+  TRY_RESULT(suggested_post, SuggestedPost::get_suggested_post(td, 
std::move(options->suggested_post_info_)));
+  if (suggested_post != nullptr) {
+    if (!allow_suggested_post) {
+      return Status::Error(400, "Can't send suggested posts with the method");
+    }
+    if (!td->dialog_manager_->is_monoforum_channel(dialog_id)) {
+      return Status::Error(400, "Suggested posts can be sent only to channel 
direct messages");
+    }
+    result.has_suggested_post = true;
+    result.suggested_post = *suggested_post;
+  }
+
+  return std::move(result);
+}
+
+Status MessageSendOptions::can_use_for(const unique_ptr<MessageContent> 
&content, MessageSelfDestructType ttl) const {
+  if (schedule_date != 0) {
+    if (ttl.is_valid()) {
+      return Status::Error(400, "Can't send scheduled self-destructing 
messages");
+    }
+    if (content->get_type() == MessageContentType::LiveLocation) {
+      return Status::Error(400, "Can't send scheduled live location messages");
+    }
+  }
+  return Status::OK();
+}
+
+Status MessageSendOptions::can_use_for(const InputMessageContent &content) 
const {
+  return can_use_for(content.content, content.ttl);
+}
+
+}  // namespace td
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/td-git20260103/td/telegram/MessageSendOptions.h 
new/td-git20260108/td/telegram/MessageSendOptions.h
--- old/td-git20260103/td/telegram/MessageSendOptions.h 1970-01-01 
01:00:00.000000000 +0100
+++ new/td-git20260108/td/telegram/MessageSendOptions.h 2026-01-11 
21:15:04.720482637 +0100
@@ -0,0 +1,83 @@
+//
+// Copyright Aliaksei Levin ([email protected]), Arseny Smirnov 
([email protected]) 2014-2026
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+#pragma once
+
+#include "td/telegram/DialogId.h"
+#include "td/telegram/MessageEffectId.h"
+#include "td/telegram/MessageSelfDestructType.h"
+#include "td/telegram/SuggestedPost.h"
+#include "td/telegram/td_api.h"
+
+#include "td/utils/common.h"
+#include "td/utils/Status.h"
+
+#include <utility>
+
+namespace td {
+
+struct InputMessageContent;
+class MessageContent;
+class Td;
+
+class MessageSendOptions {
+  static constexpr int32 SCHEDULE_WHEN_ONLINE_DATE = 2147483646;
+
+ public:
+  bool disable_notification = false;
+  bool from_background = false;
+  bool update_stickersets_order = false;
+  bool protect_content = false;
+  bool allow_paid = false;
+  bool only_preview = false;
+  bool has_suggested_post = false;
+  int32 schedule_date = 0;
+  int32 schedule_repeat_period = 0;
+  int32 sending_id = 0;
+  MessageEffectId effect_id;
+  int64 paid_message_star_count = 0;
+  SuggestedPost suggested_post;
+
+  MessageSendOptions() = default;
+  MessageSendOptions(bool disable_notification, bool from_background, bool 
update_stickersets_order,
+                     bool protect_content, bool allow_paid, bool only_preview, 
bool has_suggested_post,
+                     int32 schedule_date, int32 schedule_repeat_period, int32 
sending_id, MessageEffectId effect_id,
+                     int64 paid_message_star_count, SuggestedPost 
&&suggested_post)
+      : disable_notification(disable_notification)
+      , from_background(from_background)
+      , update_stickersets_order(update_stickersets_order)
+      , protect_content(protect_content)
+      , allow_paid(allow_paid)
+      , only_preview(only_preview)
+      , has_suggested_post(has_suggested_post)
+      , schedule_date(schedule_date)
+      , schedule_repeat_period(schedule_repeat_period)
+      , sending_id(sending_id)
+      , effect_id(effect_id)
+      , paid_message_star_count(paid_message_star_count)
+      , suggested_post(std::move(suggested_post)) {
+  }
+
+  static Result<std::pair<int32, int32>> get_message_schedule_date(
+      td_api::object_ptr<td_api::MessageSchedulingState> &&scheduling_state, 
bool allow_repeat_period);
+
+  static td_api::object_ptr<td_api::MessageSchedulingState> 
get_message_scheduling_state_object(
+      int32 send_date, int32 repeat_period, bool video_processing_pending);
+
+  static Status check_paid_message_star_count(Td *td, int64 
&paid_message_star_count, int32 message_count);
+
+  static Result<MessageSendOptions> get_message_send_options(Td *td, DialogId 
dialog_id,
+                                                             
td_api::object_ptr<td_api::messageSendOptions> &&options,
+                                                             bool 
allow_update_stickersets_order, bool allow_effect,
+                                                             bool 
allow_suggested_post, bool allow_repeat_period,
+                                                             int32 
message_count);
+
+  Status can_use_for(const unique_ptr<MessageContent> &content, 
MessageSelfDestructType ttl) const;
+
+  Status can_use_for(const InputMessageContent &content) const;
+};
+
+}  // namespace td
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/td-git20260103/td/telegram/MessagesManager.cpp 
new/td-git20260108/td/telegram/MessagesManager.cpp
--- old/td-git20260103/td/telegram/MessagesManager.cpp  2026-01-05 
15:26:26.898258631 +0100
+++ new/td-git20260108/td/telegram/MessagesManager.cpp  2026-01-11 
21:15:04.735482513 +0100
@@ -19770,50 +19770,6 @@
   promise.set_result(std::move(result));
 }
 
-Result<std::pair<int32, int32>> MessagesManager::get_message_schedule_date(
-    td_api::object_ptr<td_api::MessageSchedulingState> &&scheduling_state, 
bool allow_repeat_period) {
-  if (scheduling_state == nullptr) {
-    return std::make_pair(0, 0);
-  }
-
-  switch (scheduling_state->get_id()) {
-    case td_api::messageSchedulingStateSendWhenVideoProcessed::ID:
-      return Status::Error(400, "Can't force video processing");
-    case td_api::messageSchedulingStateSendWhenOnline::ID: {
-      auto send_date = SCHEDULE_WHEN_ONLINE_DATE;
-      return std::make_pair(send_date, 0);
-    }
-    case td_api::messageSchedulingStateSendAtDate::ID: {
-      auto send_at_date = 
td_api::move_object_as<td_api::messageSchedulingStateSendAtDate>(scheduling_state);
-      auto send_date = send_at_date->send_date_;
-      if (send_date <= 0) {
-        return Status::Error(400, "Invalid send date specified");
-      }
-      if (send_date <= G()->unix_time() + 10) {
-        return std::make_pair(0, 0);
-      }
-      if (send_date - G()->unix_time() > 367 * 86400) {
-        return Status::Error(400, "Send date is too far in the future");
-      }
-      auto repeat_period = send_at_date->repeat_period_;
-      if (!allow_repeat_period && repeat_period != 0) {
-        return Status::Error(400, "Repeated scheduled messages aren't 
supported");
-      }
-      if (repeat_period != 0 && repeat_period != 86400 && repeat_period != 7 * 
86400 && repeat_period != 14 * 86400 &&
-          repeat_period != 30 * 86400 && repeat_period != 91 * 86400 && 
repeat_period != 182 * 86400 &&
-          repeat_period != 365 * 86400) {
-        if (!G()->is_test_dc() || (repeat_period != 60 && repeat_period != 
300)) {
-          return Status::Error(400, "Invalid message repeat period specified");
-        }
-      }
-      return std::make_pair(send_date, repeat_period);
-    }
-    default:
-      UNREACHABLE();
-      return std::make_pair(0, 0);
-  }
-}
-
 int64 MessagesManager::get_required_paid_message_star_count(int32 error_code, 
CSlice error_message) {
   auto allow_payment_required_prefix = CSlice("ALLOW_PAYMENT_REQUIRED_");
   if ((error_code == 400 || error_code == 403) && begins_with(error_message, 
allow_payment_required_prefix)) {
@@ -19845,17 +19801,6 @@
   return nullptr;
 }
 
-tl_object_ptr<td_api::MessageSchedulingState> 
MessagesManager::get_message_scheduling_state_object(
-    int32 send_date, int32 repeat_period, bool video_processing_pending) {
-  if (video_processing_pending) {
-    return 
td_api::make_object<td_api::messageSchedulingStateSendWhenVideoProcessed>(send_date);
-  }
-  if (send_date == SCHEDULE_WHEN_ONLINE_DATE) {
-    return td_api::make_object<td_api::messageSchedulingStateSendWhenOnline>();
-  }
-  return 
td_api::make_object<td_api::messageSchedulingStateSendAtDate>(send_date, 
repeat_period);
-}
-
 td_api::object_ptr<td_api::MessageContent> 
MessagesManager::get_message_message_content_object(DialogId dialog_id,
                                                                                
                const Message *m) const {
   auto live_location_date = m->is_failed_to_send ? 0 : m->date;
@@ -20031,8 +19976,8 @@
   double auto_delete_in =
       m->ttl_period == 0 ? 0.0 : clamp(m->date + m->ttl_period - 
G()->server_time(), 1e-3, m->ttl_period - 1e-3);
   auto sender = get_message_sender_object_const(td_, m->sender_user_id, 
m->sender_dialog_id, source);
-  auto scheduling_state = is_scheduled ? 
get_message_scheduling_state_object(m->date, m->schedule_repeat_period,
-                                                                             
m->video_processing_pending)
+  auto scheduling_state = is_scheduled ? 
MessageSendOptions::get_message_scheduling_state_object(
+                                             m->date, 
m->schedule_repeat_period, m->video_processing_pending)
                                        : nullptr;
   auto forward_info = m->forward_info == nullptr
                           ? nullptr
@@ -21001,11 +20946,11 @@
 
   TRY_STATUS(can_send_message(dialog_id));
   TRY_RESULT(message_reply_markup, get_dialog_reply_markup(dialog_id, 
std::move(reply_markup)));
-  TRY_RESULT(message_send_options,
-             process_message_send_options(dialog_id, std::move(options), true, 
true, true, true, 1));
+  TRY_RESULT(message_send_options, 
MessageSendOptions::get_message_send_options(td_, dialog_id, std::move(options),
+                                                                               
 true, true, true, true, 1));
   TRY_RESULT(message_content, process_input_message_content(dialog_id, 
std::move(input_message_content),
                                                             
!message_send_options.allow_paid));
-  TRY_STATUS(can_use_message_send_options(message_send_options, 
message_content));
+  TRY_STATUS(message_send_options.can_use_for(message_content));
 
   // there must be no errors after get_message_to_send call
 
@@ -21107,116 +21052,6 @@
   return std::move(content);
 }
 
-Status MessagesManager::check_paid_message_star_count(int64 
&paid_message_star_count, int32 message_count) const {
-  if (paid_message_star_count < 0 || paid_message_star_count > 1000000) {
-    return Status::Error(400, "Invalid price for paid message specified");
-  }
-  CHECK(message_count > 0);
-  if (paid_message_star_count % message_count != 0) {
-    return Status::Error(400, "Invalid price for paid messages specified");
-  }
-  if (paid_message_star_count > 0 && 
!td_->star_manager_->has_owned_star_count(paid_message_star_count)) {
-    return Status::Error(400, "Have not enough Telegram Stars");
-  }
-  paid_message_star_count /= message_count;
-  return Status::OK();
-}
-
-Result<MessagesManager::MessageSendOptions> 
MessagesManager::process_message_send_options(
-    DialogId dialog_id, tl_object_ptr<td_api::messageSendOptions> &&options, 
bool allow_update_stickersets_order,
-    bool allow_effect, bool allow_suggested_post, bool allow_repeat_period, 
int32 message_count) const {
-  MessageSendOptions result;
-  if (options == nullptr) {
-    return std::move(result);
-  }
-
-  result.disable_notification = options->disable_notification_;
-  result.from_background = options->from_background_;
-  if (allow_update_stickersets_order) {
-    result.update_stickersets_order = 
options->update_order_of_installed_sticker_sets_;
-  }
-  if (td_->auth_manager_->is_bot()) {
-    result.protect_content = options->protect_content_;
-    result.allow_paid = options->allow_paid_broadcast_;
-  } else {
-    result.paid_message_star_count = options->paid_message_star_count_;
-    TRY_STATUS(check_paid_message_star_count(result.paid_message_star_count, 
message_count));
-  }
-  result.only_preview = options->only_preview_;
-  TRY_RESULT(schedule_date, 
get_message_schedule_date(std::move(options->scheduling_state_), 
allow_repeat_period));
-  result.schedule_date = schedule_date.first;
-  result.schedule_repeat_period = schedule_date.second;
-  result.sending_id = options->sending_id_;
-
-  if (result.schedule_date != 0) {
-    auto dialog_type = dialog_id.get_type();
-    if (dialog_type == DialogType::SecretChat) {
-      return Status::Error(400, "Can't schedule messages in secret chats");
-    }
-    if (td_->auth_manager_->is_bot()) {
-      return Status::Error(400, "Bots can't send scheduled messages");
-    }
-
-    if (result.schedule_date == SCHEDULE_WHEN_ONLINE_DATE) {
-      if (dialog_type != DialogType::User) {
-        return Status::Error(400, "Messages can be scheduled till online only 
in private chats");
-      }
-      if (dialog_id == td_->dialog_manager_->get_my_dialog_id()) {
-        return Status::Error(400, "Can't scheduled till online messages in 
chat with self");
-      }
-    }
-    if (result.paid_message_star_count > 0) {
-      return Status::Error(400, "Can't schedule paid messages");
-    }
-    if (td_->dialog_manager_->is_admined_monoforum_channel(dialog_id)) {
-      return Status::Error(400, "Can't schedule messages in channel direct 
messages chats");
-    }
-  }
-  if (options->effect_id_ != 0) {
-    auto dialog_type = dialog_id.get_type();
-    if (dialog_type != DialogType::User) {
-      return Status::Error(400, "Can't use message effects in the chat");
-    }
-    if (!allow_effect) {
-      return Status::Error(400, "Can't use message effects in the method");
-    }
-    result.effect_id = MessageEffectId(options->effect_id_);
-  }
-  TRY_RESULT(suggested_post, SuggestedPost::get_suggested_post(td_, 
std::move(options->suggested_post_info_)));
-  if (suggested_post != nullptr) {
-    if (!allow_suggested_post) {
-      return Status::Error(400, "Can't send suggested posts with the method");
-    }
-    if (!td_->dialog_manager_->is_monoforum_channel(dialog_id)) {
-      return Status::Error(400, "Suggested posts can be sent only to channel 
direct messages");
-    }
-    result.has_suggested_post = true;
-    result.suggested_post = *suggested_post;
-  }
-
-  return std::move(result);
-}
-
-Status MessagesManager::can_use_message_send_options(const MessageSendOptions 
&options,
-                                                     const 
unique_ptr<MessageContent> &content,
-                                                     MessageSelfDestructType 
ttl) {
-  if (options.schedule_date != 0) {
-    if (ttl.is_valid()) {
-      return Status::Error(400, "Can't send scheduled self-destructing 
messages");
-    }
-    if (content->get_type() == MessageContentType::LiveLocation) {
-      return Status::Error(400, "Can't send scheduled live location messages");
-    }
-  }
-
-  return Status::OK();
-}
-
-Status MessagesManager::can_use_message_send_options(const MessageSendOptions 
&options,
-                                                     const InputMessageContent 
&content) {
-  return can_use_message_send_options(options, content.content, content.ttl);
-}
-
 Status MessagesManager::can_use_forum_topic_id(Dialog *d, ForumTopicId 
forum_topic_id) {
   if (forum_topic_id == ForumTopicId()) {
     return Status::OK();
@@ -21259,14 +21094,15 @@
   }
 
   TRY_STATUS(can_send_message(dialog_id));
-  TRY_RESULT(message_send_options, process_message_send_options(dialog_id, 
std::move(options), true, true, false, false,
-                                                                
static_cast<int32>(input_message_contents.size())));
+  TRY_RESULT(message_send_options,
+             MessageSendOptions::get_message_send_options(td_, dialog_id, 
std::move(options), true, true, false, false,
+                                                          
static_cast<int32>(input_message_contents.size())));
 
   vector<InputMessageContent> message_contents;
   for (auto &input_message_content : input_message_contents) {
     TRY_RESULT(message_content, process_input_message_content(dialog_id, 
std::move(input_message_content),
                                                               
!message_send_options.allow_paid));
-    TRY_STATUS(can_use_message_send_options(message_send_options, 
message_content));
+    TRY_STATUS(message_send_options.can_use_for(message_content));
     message_contents.push_back(std::move(message_content));
   }
   TRY_STATUS(check_message_group_message_contents(message_contents));
@@ -22359,8 +22195,8 @@
   }
 
   TRY_STATUS(can_send_message(dialog_id));
-  TRY_RESULT(message_send_options,
-             process_message_send_options(dialog_id, std::move(options), 
false, false, false, false, 1));
+  TRY_RESULT(message_send_options, 
MessageSendOptions::get_message_send_options(td_, dialog_id, std::move(options),
+                                                                               
 false, false, false, false, 1));
   bool to_secret = false;
   switch (dialog_id.get_type()) {
     case DialogType::User:
@@ -22390,7 +22226,7 @@
 
   TRY_RESULT(message_topic, MessageTopic::get_send_message_topic(td_, 
dialog_id, topic_id));
   auto input_reply_to = create_message_input_reply_to(d, message_topic, 
std::move(reply_to), false);
-  TRY_STATUS(can_use_message_send_options(message_send_options, 
content->message_content, MessageSelfDestructType()));
+  TRY_STATUS(message_send_options.can_use_for(content->message_content, 
MessageSelfDestructType()));
   TRY_STATUS(can_send_message_content(dialog_id, 
content->message_content.get(), false, true, td_));
 
   auto message_content = dup_message_content(td_, dialog_id, 
content->message_content.get(),
@@ -23180,7 +23016,8 @@
 void MessagesManager::edit_message_scheduling_state(
     MessageFullId message_full_id, 
td_api::object_ptr<td_api::MessageSchedulingState> &&scheduling_state,
     Promise<Unit> &&promise) {
-  TRY_RESULT_PROMISE(promise, schedule_date, 
get_message_schedule_date(std::move(scheduling_state), true));
+  TRY_RESULT_PROMISE(promise, schedule_date,
+                     
MessageSendOptions::get_message_schedule_date(std::move(scheduling_state), 
true));
 
   auto dialog_id = message_full_id.get_dialog_id();
   TRY_RESULT_PROMISE(promise, d,
@@ -23979,10 +23816,10 @@
   }
 
   TRY_STATUS(can_send_message(to_dialog_id));
-  TRY_RESULT(message_send_options,
-             process_message_send_options(to_dialog_id, std::move(options), 
false, message_ids.size() == 1u,
-                                          add_offer || message_ids.size() == 
1u, message_ids.size() == 1u,
-                                          
static_cast<int32>(message_ids.size())));
+  TRY_RESULT(message_send_options, 
MessageSendOptions::get_message_send_options(
+                                       td_, to_dialog_id, std::move(options), 
false, message_ids.size() == 1u,
+                                       add_offer || message_ids.size() == 1u, 
message_ids.size() == 1u,
+                                       
static_cast<int32>(message_ids.size())));
   TRY_RESULT(message_topic, MessageTopic::get_send_message_topic(td_, 
to_dialog_id, topic_id));
   if (message_topic.is_thread()) {
     return Status::Error(400, "Can't forward messages to a specific message 
thread");
@@ -24080,8 +23917,7 @@
       continue;
     }
 
-    auto can_use_options_status =
-        can_use_message_send_options(message_send_options, content, 
MessageSelfDestructType());
+    auto can_use_options_status = message_send_options.can_use_for(content, 
MessageSelfDestructType());
     if (can_use_options_status.is_error()) {
       LOG(INFO) << "Can't forward " << message_id << ": " << 
can_send_status.message();
       continue;
@@ -24545,7 +24381,7 @@
     }
   }
   if (paid_message_count > 0) {
-    TRY_STATUS(check_paid_message_star_count(paid_message_star_count, 
paid_message_count));
+    TRY_STATUS(MessageSendOptions::check_paid_message_star_count(td_, 
paid_message_star_count, paid_message_count));
   }
 
   vector<MessageId> result(message_ids.size());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/td-git20260103/td/telegram/MessagesManager.h 
new/td-git20260108/td/telegram/MessagesManager.h
--- old/td-git20260103/td/telegram/MessagesManager.h    2026-01-05 
15:26:26.899258625 +0100
+++ new/td-git20260108/td/telegram/MessagesManager.h    2026-01-11 
21:15:04.736482505 +0100
@@ -41,6 +41,7 @@
 #include "td/telegram/MessageReplyInfo.h"
 #include "td/telegram/MessageSearchFilter.h"
 #include "td/telegram/MessageSelfDestructType.h"
+#include "td/telegram/MessageSendOptions.h"
 #include "td/telegram/MessagesInfo.h"
 #include "td/telegram/MessageSource.h"
 #include "td/telegram/MessageThreadInfo.h"
@@ -70,7 +71,6 @@
 #include "td/telegram/ServerMessageId.h"
 #include "td/telegram/StoryFullId.h"
 #include "td/telegram/StoryNotificationSettings.h"
-#include "td/telegram/SuggestedPost.h"
 #include "td/telegram/td_api.h"
 #include "td/telegram/telegram_api.h"
 #include "td/telegram/UserId.h"
@@ -1532,42 +1532,6 @@
     Promise<Unit> success_promise;
   };
 
-  struct MessageSendOptions {
-    bool disable_notification = false;
-    bool from_background = false;
-    bool update_stickersets_order = false;
-    bool protect_content = false;
-    bool allow_paid = false;
-    bool only_preview = false;
-    bool has_suggested_post = false;
-    int32 schedule_date = 0;
-    int32 schedule_repeat_period = 0;
-    int32 sending_id = 0;
-    MessageEffectId effect_id;
-    int64 paid_message_star_count = 0;
-    SuggestedPost suggested_post;
-
-    MessageSendOptions() = default;
-    MessageSendOptions(bool disable_notification, bool from_background, bool 
update_stickersets_order,
-                       bool protect_content, bool allow_paid, bool 
only_preview, bool has_suggested_post,
-                       int32 schedule_date, int32 schedule_repeat_period, 
int32 sending_id, MessageEffectId effect_id,
-                       int64 paid_message_star_count, SuggestedPost 
&&suggested_post)
-        : disable_notification(disable_notification)
-        , from_background(from_background)
-        , update_stickersets_order(update_stickersets_order)
-        , protect_content(protect_content)
-        , allow_paid(allow_paid)
-        , only_preview(only_preview)
-        , has_suggested_post(has_suggested_post)
-        , schedule_date(schedule_date)
-        , schedule_repeat_period(schedule_repeat_period)
-        , sending_id(sending_id)
-        , effect_id(effect_id)
-        , paid_message_star_count(paid_message_star_count)
-        , suggested_post(std::move(suggested_post)) {
-    }
-  };
-
   struct SuffixLoadQueries {
     bool suffix_load_done_ = false;
     bool suffix_load_has_query_ = false;
@@ -1652,8 +1616,6 @@
 
   static constexpr int32 MAX_RESEND_DELAY = 86400;  // seconds, some 
reasonable limit
 
-  static constexpr int32 SCHEDULE_WHEN_ONLINE_DATE = 2147483646;
-
   static constexpr bool DROP_SEND_MESSAGE_UPDATES = false;
 
   vector<UserId> get_message_user_ids(const Message *m) const;
@@ -1715,19 +1677,6 @@
       DialogId dialog_id, tl_object_ptr<td_api::InputMessageContent> 
&&input_message_content,
       bool check_permissions = true);
 
-  Status check_paid_message_star_count(int64 &paid_message_star_count, int32 
message_count) const;
-
-  Result<MessageSendOptions> process_message_send_options(DialogId dialog_id,
-                                                          
tl_object_ptr<td_api::messageSendOptions> &&options,
-                                                          bool 
allow_update_stickersets_order, bool allow_effect,
-                                                          bool 
allow_suggested_post, bool allow_repeat_period,
-                                                          int32 message_count) 
const;
-
-  static Status can_use_message_send_options(const MessageSendOptions &options,
-                                             const unique_ptr<MessageContent> 
&content, MessageSelfDestructType ttl);
-
-  static Status can_use_message_send_options(const MessageSendOptions 
&options, const InputMessageContent &content);
-
   Status can_use_forum_topic_id(Dialog *d, ForumTopicId forum_topic_id);
 
   int64 generate_new_random_id(const Dialog *d);
@@ -2471,14 +2420,8 @@
 
   void do_repair_dialog_active_group_call_id(DialogId dialog_id);
 
-  static Result<std::pair<int32, int32>> get_message_schedule_date(
-      td_api::object_ptr<td_api::MessageSchedulingState> &&scheduling_state, 
bool allow_repeat_period);
-
   tl_object_ptr<td_api::MessageSendingState> 
get_message_sending_state_object(const Message *m) const;
 
-  static tl_object_ptr<td_api::MessageSchedulingState> 
get_message_scheduling_state_object(
-      int32 send_date, int32 repeat_period, bool video_processing_pending);
-
   td_api::object_ptr<td_api::MessageContent> 
get_message_message_content_object(DialogId dialog_id,
                                                                                
 const Message *m) const;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/td-git20260103/td/telegram/Requests.cpp 
new/td-git20260108/td/telegram/Requests.cpp
--- old/td-git20260103/td/telegram/Requests.cpp 2026-01-05 15:26:26.960258240 
+0100
+++ new/td-git20260108/td/telegram/Requests.cpp 2026-01-11 21:15:04.797482000 
+0100
@@ -8037,10 +8037,7 @@
   CREATE_OK_REQUEST_PROMISE();
   TRY_RESULT_PROMISE(promise, owner_dialog_id, 
get_message_sender_dialog_id(td_, request.owner_id_, true, false));
   td_->star_gift_manager_->set_dialog_pinned_gifts(
-      owner_dialog_id,
-      transform(request.received_gift_ids_,
-                [](const string &received_gift_id) { return 
StarGiftId(received_gift_id); }),
-      std::move(promise));
+      owner_dialog_id, 
StarGiftId::get_star_gift_ids(request.received_gift_ids_), std::move(promise));
 }
 
 void Requests::on_request(uint64 id, const td_api::toggleChatGiftNotifications 
&request) {
@@ -8197,10 +8194,7 @@
   CREATE_REQUEST_PROMISE();
   TRY_RESULT_PROMISE(promise, owner_dialog_id, 
get_message_sender_dialog_id(td_, request.owner_id_, true, false));
   td_->star_gift_manager_->create_gift_collection(
-      owner_dialog_id, request.name_,
-      transform(request.received_gift_ids_,
-                [](const string &received_gift_id) { return 
StarGiftId(received_gift_id); }),
-      std::move(promise));
+      owner_dialog_id, request.name_, 
StarGiftId::get_star_gift_ids(request.received_gift_ids_), std::move(promise));
 }
 
 void Requests::on_request(uint64 id, const td_api::reorderGiftCollections 
&request) {
@@ -8234,33 +8228,27 @@
   CHECK_IS_USER();
   CREATE_REQUEST_PROMISE();
   TRY_RESULT_PROMISE(promise, owner_dialog_id, 
get_message_sender_dialog_id(td_, request.owner_id_, true, false));
-  td_->star_gift_manager_->add_gift_collection_gifts(
-      owner_dialog_id, StarGiftCollectionId(request.collection_id_),
-      transform(request.received_gift_ids_,
-                [](const string &received_gift_id) { return 
StarGiftId(received_gift_id); }),
-      std::move(promise));
+  td_->star_gift_manager_->add_gift_collection_gifts(owner_dialog_id, 
StarGiftCollectionId(request.collection_id_),
+                                                     
StarGiftId::get_star_gift_ids(request.received_gift_ids_),
+                                                     std::move(promise));
 }
 
 void Requests::on_request(uint64 id, const td_api::removeGiftCollectionGifts 
&request) {
   CHECK_IS_USER();
   CREATE_REQUEST_PROMISE();
   TRY_RESULT_PROMISE(promise, owner_dialog_id, 
get_message_sender_dialog_id(td_, request.owner_id_, true, false));
-  td_->star_gift_manager_->remove_gift_collection_gifts(
-      owner_dialog_id, StarGiftCollectionId(request.collection_id_),
-      transform(request.received_gift_ids_,
-                [](const string &received_gift_id) { return 
StarGiftId(received_gift_id); }),
-      std::move(promise));
+  td_->star_gift_manager_->remove_gift_collection_gifts(owner_dialog_id, 
StarGiftCollectionId(request.collection_id_),
+                                                        
StarGiftId::get_star_gift_ids(request.received_gift_ids_),
+                                                        std::move(promise));
 }
 
 void Requests::on_request(uint64 id, const td_api::reorderGiftCollectionGifts 
&request) {
   CHECK_IS_USER();
   CREATE_REQUEST_PROMISE();
   TRY_RESULT_PROMISE(promise, owner_dialog_id, 
get_message_sender_dialog_id(td_, request.owner_id_, true, false));
-  td_->star_gift_manager_->reorder_gift_collection_gifts(
-      owner_dialog_id, StarGiftCollectionId(request.collection_id_),
-      transform(request.received_gift_ids_,
-                [](const string &received_gift_id) { return 
StarGiftId(received_gift_id); }),
-      std::move(promise));
+  td_->star_gift_manager_->reorder_gift_collection_gifts(owner_dialog_id, 
StarGiftCollectionId(request.collection_id_),
+                                                         
StarGiftId::get_star_gift_ids(request.received_gift_ids_),
+                                                         std::move(promise));
 }
 
 void Requests::on_request(uint64 id, td_api::createInvoiceLink &request) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/td-git20260103/td/telegram/StarGiftAttribute.cpp 
new/td-git20260108/td/telegram/StarGiftAttribute.cpp
--- old/td-git20260103/td/telegram/StarGiftAttribute.cpp        2026-01-05 
15:26:26.985258083 +0100
+++ new/td-git20260108/td/telegram/StarGiftAttribute.cpp        2026-01-11 
21:15:04.820481810 +0100
@@ -72,7 +72,7 @@
 }
 
 bool StarGiftAttributeBackdrop::is_valid() const {
-  return 0 < rarity_permille_ && rarity_permille_ <= 1000 && 
is_valid_color(center_color_) &&
+  return 0 <= rarity_permille_ && rarity_permille_ <= 1000 && 
is_valid_color(center_color_) &&
          is_valid_color(edge_color_) && is_valid_color(pattern_color_) && 
is_valid_color(text_color_);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/td-git20260103/td/telegram/StarGiftAttribute.h 
new/td-git20260108/td/telegram/StarGiftAttribute.h
--- old/td-git20260103/td/telegram/StarGiftAttribute.h  2026-01-05 
15:26:26.985258083 +0100
+++ new/td-git20260108/td/telegram/StarGiftAttribute.h  2026-01-11 
21:15:04.820481810 +0100
@@ -24,7 +24,7 @@
 class StarGiftAttributeSticker {
   string name_;
   FileId sticker_file_id_;
-  int32 rarity_permille_ = 0;
+  int32 rarity_permille_ = -1;
 
   friend bool operator==(const StarGiftAttributeSticker &lhs, const 
StarGiftAttributeSticker &rhs);
 
@@ -36,7 +36,7 @@
   StarGiftAttributeSticker(Td *td, 
telegram_api::object_ptr<telegram_api::starGiftAttributePattern> &&attribute);
 
   bool is_valid() const {
-    return 0 < rarity_permille_ && rarity_permille_ <= 1000 && 
sticker_file_id_.is_valid();
+    return 0 <= rarity_permille_ && rarity_permille_ <= 1000 && 
sticker_file_id_.is_valid();
   }
 
   td_api::object_ptr<td_api::upgradedGiftModel> 
get_upgraded_gift_model_object(const Td *td) const;
@@ -65,7 +65,7 @@
   int32 edge_color_ = 0;
   int32 pattern_color_ = 0;
   int32 text_color_ = 0;
-  int32 rarity_permille_ = 0;
+  int32 rarity_permille_ = -1;
 
   friend bool operator==(const StarGiftAttributeBackdrop &lhs, const 
StarGiftAttributeBackdrop &rhs);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/td-git20260103/td/telegram/StarGiftId.cpp 
new/td-git20260108/td/telegram/StarGiftId.cpp
--- old/td-git20260103/td/telegram/StarGiftId.cpp       2026-01-05 
15:26:26.989258058 +0100
+++ new/td-git20260108/td/telegram/StarGiftId.cpp       2026-01-11 
21:15:04.824481777 +0100
@@ -98,6 +98,10 @@
                    [td](const StarGiftId &star_gift_id) { return 
star_gift_id.get_input_saved_star_gift(td); });
 }
 
+vector<StarGiftId> StarGiftId::get_star_gift_ids(const vector<string> 
&star_gift_ids) {
+  return transform(star_gift_ids, [](const string &star_gift_id) { return 
StarGiftId(star_gift_id); });
+}
+
 string StarGiftId::get_star_gift_id() const {
   switch (type_) {
     case Type::Empty:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/td-git20260103/td/telegram/StarGiftId.h 
new/td-git20260108/td/telegram/StarGiftId.h
--- old/td-git20260103/td/telegram/StarGiftId.h 2026-01-05 15:26:26.989258058 
+0100
+++ new/td-git20260108/td/telegram/StarGiftId.h 2026-01-11 21:15:04.824481777 
+0100
@@ -56,6 +56,8 @@
   static vector<telegram_api::object_ptr<telegram_api::InputSavedStarGift>> 
get_input_saved_star_gifts(
       Td *td, const vector<StarGiftId> &star_gift_ids);
 
+  static vector<StarGiftId> get_star_gift_ids(const vector<string> 
&star_gift_ids);
+
   string get_star_gift_id() const;
 
   DialogId get_dialog_id(const Td *td) const;

++++++ tdesktop-6.4.1-full.tar.gz -> tdesktop-6.4.2-full.tar.gz ++++++
/work/SRC/openSUSE:Factory/telegram-desktop/tdesktop-6.4.1-full.tar.gz 
/work/SRC/openSUSE:Factory/.telegram-desktop.new.1928/tdesktop-6.4.2-full.tar.gz
 differ: char 5, line 1

Reply via email to