From 6c0c5a87f5516f9d076e300356001b46219f465b Mon Sep 17 00:00:00 2001
From: GitHub Action Telegram Premium, voice message transcription, invoices, bot description photos/animations, and attachment menu improvements. Telegram Premium, voice message transcription, invoices, bot description photos/animations, recurring payments and attachment menu improvements. The main and E2E schemes were also modified to eventually support uploading and downloading files bigger than 4GB: the current supported maximum filesize is dynamically specified, and can be fetched from the new upload_max_fileparts_default » and upload_max_fileparts_premium » app configuration fields.
Layer 143
-
+
Also, discussion group admins can now require users to join before commenting.Schema changes
@@ -138,7 +138,7 @@ Also, discussion group admins can now messages.rateTranscribedAudio - Rate transcribed voice message
Changed Methods
diff --git a/data/web/corefork.telegram.org/api/payments.html b/data/web/corefork.telegram.org/api/payments.html
index 582509cff5..3f415c0478 100644
--- a/data/web/corefork.telegram.org/api/payments.html
+++ b/data/web/corefork.telegram.org/api/payments.html
@@ -133,7 +133,8 @@ The the first button of the keyboard will always be a invoice.
The payment form also contains info about previously saved payment credentials and order information (name, phone number, email, shipping address & so on).
The full invoice contains info about the information required for the order, the price and the currency, and whether this is a test
order.
The full invoice contains info about the information required for the order, the price and the currency, and whether this is a test
order.
+The recurring
flag will be set for recurring payments, and recurring_terms_url
will link to the terms of service of the recurring payment: the user must read and accept them before continuing.
invoice#3e85a91b flags:# test:flags.0?true name_requested:flags.1?true phone_requested:flags.2?true email_requested:flags.3?true shipping_address_requested:flags.4?true flexible:flags.5?true phone_to_provider:flags.6?true email_to_provider:flags.7?true recurring:flags.9?true currency:string prices:Vector<LabeledPrice> max_tip_amount:flags.8?long suggested_tip_amounts:flags.8?Vector<long> recurring_terms_url:flags.9?string = Invoice;
@@ -314,7 +315,9 @@ The bot must reply using mes
Clients should treat invoice messages with a receipt_msg_id
field as receipt messages, locally modifying the label of the keyboardButtonBuy button to a localized version of the word Receipt
.
From this point, clicking on the Receipt
button should trigger a call to payments.getPaymentReceipt, providing the receipt_msg_id
to the msg_id
field, which will return info about the transaction.
The payment will also generate one service message of type messageActionPaymentSent or messageActionPaymentSentMe, replying to the invoice.
-For bots, the service message will be of type messageActionPaymentSentMe, for users it will be a messageActionPaymentSent.
+For bots, the service message will be of type messageActionPaymentSentMe, for users it will be a messageActionPaymentSent.
+The recurring_init
flag will be set if this payment also enables future recurring payments.
+Further recurring payments will automatically send messageActionPaymentSentMe and messageActionPaymentSent messages with the recurring_used
flag set.
messageActionPaymentSentMe#8f31b327 flags:# recurring_init:flags.2?true recurring_used:flags.3?true currency:string total_amount:long payload:bytes info:flags.0?PaymentRequestedInfo shipping_option_id:flags.1?string charge:PaymentCharge = MessageAction;
messageActionPaymentSent#96163f56 flags:# recurring_init:flags.2?true recurring_used:flags.3?true currency:string total_amount:long invoice_slug:flags.0?string = MessageAction;
diff --git a/data/web/corefork.telegram.org/api/premium.html b/data/web/corefork.telegram.org/api/premium.html
index 16917a920e..66985a7253 100644
--- a/data/web/corefork.telegram.org/api/premium.html
+++ b/data/web/corefork.telegram.org/api/premium.html
@@ -149,8 +149,8 @@ Then, when the user clicks on the subscribe button in the sent invoice, follow t
---functions---
users.getFullUser#b60f5918 id:InputUser = users.UserFull;
-If after calling users.getFullUser the resulting userFull constructor has one or more premiumGiftOptions in the premium_gifts
field, we can gift a Telegram Premium subscription to this user.
The premiumGiftOption constructors contain an ordered list of Premium gift offers with discounts over the base price: to process the gift payment open the deep link contained in the bot_url
field.
If after calling users.getFullUser the resulting userFull constructor has one or more premiumGiftOptions in the premium_gifts
field, we can gift a non-recurring Telegram Premium subscription to this user.
The premiumGiftOption constructors contain an ordered list of Premium gift offers with discounts over the base price, according to the subscription duration: to process the gift payment open the deep link contained in the bot_url
field.
Once the payment is successfully processed, the user to which the gift was sent will automatically receive a messageService from the user that sent the gift, containing a messageActionGiftPremium constructor with further info about the price and duration of the gifted Telegram Premium subscription.
Clients should display this message, along with a sticker from the inputStickerSetPremiumGifts stickerset: here's an example.
Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase.
+Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase, official apps only.