Add "can_withdraw_channel_revenue" option.
This commit is contained in:
parent
701011ab86
commit
5ea94725d7
@ -10147,7 +10147,7 @@ getChatRevenueStatistics chat_id:int53 is_dark:Bool = ChatRevenueStatistics;
|
||||
//@password The 2-step verification password of the current user
|
||||
getChatRevenueWithdrawalUrl chat_id:int53 password:string = HttpUrl;
|
||||
|
||||
//@description Returns list of revenue transactions for a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true
|
||||
//@description Returns list of revenue transactions for a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true and getOption("can_withdraw_chat_revenue")
|
||||
//@chat_id Chat identifier
|
||||
//@offset Number of transactions to skip
|
||||
//@limit The maximum number of transactions to be returned; up to 200
|
||||
|
@ -2038,6 +2038,10 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
|
||||
!get_json_value_bool(std::move(key_value->value_), key));
|
||||
continue;
|
||||
}
|
||||
if (key == "channel_revenue_withdrawal_enabled") {
|
||||
G()->set_option_boolean("can_withdraw_chat_revenue", get_json_value_bool(std::move(key_value->value_), key));
|
||||
continue;
|
||||
}
|
||||
|
||||
new_values.push_back(std::move(key_value));
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ class ConfigManager final : public NetQueryCallback {
|
||||
|
||||
private:
|
||||
struct AppConfig {
|
||||
static constexpr int32 CURRENT_VERSION = 36;
|
||||
static constexpr int32 CURRENT_VERSION = 37;
|
||||
int32 version_ = 0;
|
||||
int32 hash_ = 0;
|
||||
telegram_api::object_ptr<telegram_api::JSONValue> config_;
|
||||
|
Loading…
Reference in New Issue
Block a user