Add "business_chat_link_count_max" option.
This commit is contained in:
parent
8e35a2477c
commit
c0abb6348b
@ -9772,7 +9772,8 @@ removeBusinessConnectedBotFromChat chat_id:int53 = Ok;
|
|||||||
//@description Returns business chat links created for the current account
|
//@description Returns business chat links created for the current account
|
||||||
getBusinessChatLinks = BusinessChatLinks;
|
getBusinessChatLinks = BusinessChatLinks;
|
||||||
|
|
||||||
//@description Creates a business chat link for the current account. Requires Telegram Business subscription. Returns the created link @link Description of the link to create
|
//@description Creates a business chat link for the current account. Requires Telegram Business subscription. There can be up to getOption("business_chat_link_count_max") links created. Returns the created link
|
||||||
|
//@link Description of the link to create
|
||||||
createBusinessChatLink link:inputBusinessChatLink = BusinessChatLink;
|
createBusinessChatLink link:inputBusinessChatLink = BusinessChatLink;
|
||||||
|
|
||||||
|
|
||||||
|
@ -2054,6 +2054,10 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
|
|||||||
G()->set_option_integer(key, get_json_value_int(std::move(key_value->value_), key));
|
G()->set_option_integer(key, get_json_value_int(std::move(key_value->value_), key));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (key == "business_chat_links_limit") {
|
||||||
|
G()->set_option_integer("business_chat_link_count_max", get_json_value_int(std::move(key_value->value_), key));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
new_values.push_back(std::move(key_value));
|
new_values.push_back(std::move(key_value));
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ class ConfigManager final : public NetQueryCallback {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
struct AppConfig {
|
struct AppConfig {
|
||||||
static constexpr int32 CURRENT_VERSION = 39;
|
static constexpr int32 CURRENT_VERSION = 40;
|
||||||
int32 version_ = 0;
|
int32 version_ = 0;
|
||||||
int32 hash_ = 0;
|
int32 hash_ = 0;
|
||||||
telegram_api::object_ptr<telegram_api::JSONValue> config_;
|
telegram_api::object_ptr<telegram_api::JSONValue> config_;
|
||||||
|
@ -148,6 +148,7 @@ OptionManager::OptionManager(Td *td)
|
|||||||
set_default_integer_option("premium_download_speedup", 10);
|
set_default_integer_option("premium_download_speedup", 10);
|
||||||
set_default_integer_option("premium_upload_speedup", 10);
|
set_default_integer_option("premium_upload_speedup", 10);
|
||||||
set_default_integer_option("upload_premium_speedup_notify_period", 3600);
|
set_default_integer_option("upload_premium_speedup_notify_period", 3600);
|
||||||
|
set_default_integer_option("business_chat_link_count_max", is_test_dc ? 5 : 100);
|
||||||
|
|
||||||
if (options.isset("my_phone_number") || !options.isset("my_id")) {
|
if (options.isset("my_phone_number") || !options.isset("my_id")) {
|
||||||
update_premium_options();
|
update_premium_options();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user