diff options
| author | levlam <levlam@telegram.org> | 2024-08-14 05:04:59 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2024-08-14 05:04:59 +0300 |
| commit | 076173dcf4df8d7a90e9c9df6aff3a2eecbf08f2 (patch) | |
| tree | 3e4a70f92eb06d72787b863778c25b648ace57b2 | |
| parent | 072cba1396d665449a98259f9f33436ca46ff214 (diff) | |
Various fixes.
| -rw-r--r-- | td/generate/scheme/td_api.tl | 6 | ||||
| -rw-r--r-- | td/telegram/ChatReactions.cpp | 1 | ||||
| -rw-r--r-- | td/telegram/DialogInviteLink.cpp | 4 | ||||
| -rw-r--r-- | td/telegram/MessageReactor.cpp | 2 | ||||
| -rw-r--r-- | td/telegram/ReactionType.cpp | 1 | ||||
| -rw-r--r-- | td/telegram/SponsoredMessageManager.cpp | 1 | ||||
| -rw-r--r-- | td/telegram/StarManager.cpp | 8 |
7 files changed, 14 insertions, 9 deletions
diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 92a5b27ed..cb798a2df 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -896,7 +896,7 @@ botTransactionPurposePaidMedia media:vector<PaidMedia> = BotTransactionPurpose; //@description User bought a product from the bot //@product_info Information about the bought product; may be null if not applicable //@invoice_payload Invoice payload; for bots only -botTransactionPurposeInvoicePayment product_info:productInfo invoice_payload:bytes = BotTransactionPurpose; +botTransactionPurposeInvoicePayment product_info:productInfo invoice_payload:bytes = BotTransactionPurpose; //@class ChannelTransactionPurpose @description Describes purpose of a transaction with a channel @@ -1234,7 +1234,7 @@ supergroupMembersFilterBots = SupergroupMembersFilter; //@subscription_pricing Information about subscription plan that is applied to the users joining the chat by the link; may be null if the link doesn't require subscription //@member_limit The maximum number of members, which can join the chat using the link simultaneously; 0 if not limited. Always 0 if the link requires approval //@member_count Number of chat members, which joined the chat using the link -//@expired_member_count Number of chat members, which joined the chat using the link, but have already left because of expired subscription; for subscription links only +//@expired_member_count Number of chat members, which joined the chat using the link, but have already left because of expired subscription; for subscription links only //@pending_join_request_count Number of pending join requests created using this link //@creates_join_request True, if the link only creates join request. If true, total number of joining members will be unlimited //@is_primary True, if the link is primary. Primary invite link can't have name, expiration date, or usage limit. There is exactly one primary invite link for each administrator with can_invite_users right at a given time @@ -10176,7 +10176,7 @@ getChatInviteLinks chat_id:int53 creator_user_id:int53 is_revoked:Bool offset_da //@description Returns chat members joined a chat via an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links //@chat_id Chat identifier //@invite_link Invite link for which to return chat members -//@only_with_expired_subscription True, if the link is a subscription link and only members with expired subscription must be returned +//@only_with_expired_subscription Pass true if the link is a subscription link and only members with expired subscription must be returned //@offset_member A chat member from which to return next chat members; pass null to get results from the beginning //@limit The maximum number of chat members to return; up to 100 getChatInviteLinkMembers chat_id:int53 invite_link:string only_with_expired_subscription:Bool offset_member:chatInviteLinkMember limit:int32 = ChatInviteLinkMembers; diff --git a/td/telegram/ChatReactions.cpp b/td/telegram/ChatReactions.cpp index 788d06235..a379a45ed 100644 --- a/td/telegram/ChatReactions.cpp +++ b/td/telegram/ChatReactions.cpp @@ -10,6 +10,7 @@ #include "td/telegram/Td.h" #include "td/utils/algorithm.h" +#include "td/utils/logging.h" namespace td { diff --git a/td/telegram/DialogInviteLink.cpp b/td/telegram/DialogInviteLink.cpp index 11e28dde3..a0aa28334 100644 --- a/td/telegram/DialogInviteLink.cpp +++ b/td/telegram/DialogInviteLink.cpp @@ -135,8 +135,8 @@ StringBuilder &operator<<(StringBuilder &string_builder, const DialogInviteLink << invite_link.creator_user_id_ << " created at " << invite_link.date_ << " edited at " << invite_link.edit_date_ << " expiring at " << invite_link.expire_date_ << " used by " << invite_link.usage_count_ << " + " << invite_link.expired_usage_count_ << " with usage limit " - << invite_link.usage_limit_ << ", " << invite_link.request_count_ << " pending join requests" - << " and " << invite_link.pricing_ << "]"; + << invite_link.usage_limit_ << ", " << invite_link.request_count_ + << " pending join requests and " << invite_link.pricing_ << "]"; } } // namespace td diff --git a/td/telegram/MessageReactor.cpp b/td/telegram/MessageReactor.cpp index f83617f7f..b79c7727a 100644 --- a/td/telegram/MessageReactor.cpp +++ b/td/telegram/MessageReactor.cpp @@ -9,6 +9,8 @@ #include "td/telegram/Dependencies.h" #include "td/telegram/MessageSender.h" +#include "td/utils/logging.h" + #include <algorithm> namespace td { diff --git a/td/telegram/ReactionType.cpp b/td/telegram/ReactionType.cpp index 2e8ffd0ea..8f4185608 100644 --- a/td/telegram/ReactionType.cpp +++ b/td/telegram/ReactionType.cpp @@ -13,6 +13,7 @@ #include "td/utils/base64.h" #include "td/utils/crypto.h" #include "td/utils/emoji.h" +#include "td/utils/logging.h" #include "td/utils/Slice.h" #include "td/utils/SliceBuilder.h" #include "td/utils/utf8.h" diff --git a/td/telegram/SponsoredMessageManager.cpp b/td/telegram/SponsoredMessageManager.cpp index 57985b20a..35fd5cae5 100644 --- a/td/telegram/SponsoredMessageManager.cpp +++ b/td/telegram/SponsoredMessageManager.cpp @@ -12,6 +12,7 @@ #include "td/telegram/DialogManager.h" #include "td/telegram/Global.h" #include "td/telegram/MessageContent.h" +#include "td/telegram/MessageContentType.h" #include "td/telegram/MessageEntity.h" #include "td/telegram/MessageSelfDestructType.h" #include "td/telegram/net/NetQueryCreator.h" diff --git a/td/telegram/StarManager.cpp b/td/telegram/StarManager.cpp index d373ee963..93143d6a2 100644 --- a/td/telegram/StarManager.cpp +++ b/td/telegram/StarManager.cpp @@ -206,7 +206,7 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler { LOG(ERROR) << "Receive Star transaction with bot payload"; } } - auto get_paid_media_objects = [&](DialogId dialog_id) -> vector<td_api::object_ptr<td_api::PaidMedia>> { + auto get_paid_media_object = [&](DialogId dialog_id) -> vector<td_api::object_ptr<td_api::PaidMedia>> { auto extended_media = transform(std::move(transaction->extended_media_), [td = td_, dialog_id](auto &&media) { return MessageExtendedMedia(td, std::move(media), dialog_id); }); @@ -282,7 +282,7 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler { if (!transaction->extended_media_.empty()) { // TODO return td_api::make_object<td_api::starTransactionPartnerBusiness>( td_->user_manager_->get_user_id_object(user_id, "starTransactionPartnerBusiness"), - get_paid_media_objects(DialogId(user_id))); + get_paid_media_object(DialogId(user_id))); } LOG(ERROR) << "Receive Telegram Star transaction with " << user_id; return td_api::make_object<td_api::starTransactionPartnerUnsupported>(); @@ -294,7 +294,7 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler { return td_api::make_object<td_api::starTransactionPartnerBot>( td_->user_manager_->get_user_id_object(user_id, "starTransactionPartnerBot"), td_api::make_object<td_api::botTransactionPurposePaidMedia>( - get_paid_media_objects(DialogId(user_id)))); + get_paid_media_object(DialogId(user_id)))); } SCOPE_EXIT { bot_payload.clear(); @@ -342,7 +342,7 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler { return td_api::make_object<td_api::starTransactionPartnerChannel>( td_->dialog_manager_->get_chat_id_object(dialog_id, "starTransactionPartnerChannel"), td_api::make_object<td_api::channelTransactionPurposePaidMedia>(message_id.get(), - get_paid_media_objects(dialog_id))); + get_paid_media_object(dialog_id))); } LOG(ERROR) << "Receive Telegram Star transaction with " << dialog_id; return td_api::make_object<td_api::starTransactionPartnerUnsupported>(); |
