Add "business_intro_title_length_max" and "business_intro_message_length_max" options.
This commit is contained in:
parent
188a165938
commit
87c9cc1db5
@ -628,8 +628,8 @@ businessConnectedBot bot_user_id:int53 recipients:businessRecipients can_reply:B
|
||||
businessIntro title:string message:string sticker:sticker = BusinessIntro;
|
||||
|
||||
//@description Describes settings for a business account intro to set
|
||||
//@title Title text of the intro
|
||||
//@message Message text of the intro
|
||||
//@title Title text of the intro; 0-getOption("business_intro_title_length_max") characters
|
||||
//@message Message text of the intro; 0-getOption("business_intro_message_length_max") characters
|
||||
//@sticker Greeting sticker of the intro; pass null if none. The sticker must belong to a sticker set and must not be a custom emoji
|
||||
inputBusinessIntro title:string message:string sticker:InputFile = InputBusinessIntro;
|
||||
|
||||
|
@ -1990,6 +1990,16 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
|
||||
get_json_value_int(std::move(key_value->value_), key));
|
||||
continue;
|
||||
}
|
||||
if (key == "intro_title_length_limit") {
|
||||
G()->set_option_integer("business_intro_title_length_max",
|
||||
get_json_value_int(std::move(key_value->value_), key));
|
||||
continue;
|
||||
}
|
||||
if (key == "intro_description_length_limit") {
|
||||
G()->set_option_integer("business_intro_message_length_max",
|
||||
get_json_value_int(std::move(key_value->value_), key));
|
||||
continue;
|
||||
}
|
||||
|
||||
new_values.push_back(std::move(key_value));
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ class ConfigManager final : public NetQueryCallback {
|
||||
|
||||
private:
|
||||
struct AppConfig {
|
||||
static constexpr int32 CURRENT_VERSION = 32;
|
||||
static constexpr int32 CURRENT_VERSION = 33;
|
||||
int32 version_ = 0;
|
||||
int32 hash_ = 0;
|
||||
telegram_api::object_ptr<telegram_api::JSONValue> config_;
|
||||
|
@ -141,6 +141,8 @@ OptionManager::OptionManager(Td *td)
|
||||
set_default_integer_option("group_custom_wallpaper_level_min", is_test_dc ? 4 : 10);
|
||||
set_default_integer_option("quick_reply_shortcut_count_max", is_test_dc ? 10 : 100);
|
||||
set_default_integer_option("quick_reply_shortcut_message_count_max", 20);
|
||||
set_default_integer_option("business_intro_title_length_max", 32);
|
||||
set_default_integer_option("business_intro_message_length_max", 70);
|
||||
|
||||
if (options.isset("my_phone_number") || !options.isset("my_id")) {
|
||||
update_premium_options();
|
||||
|
Loading…
Reference in New Issue
Block a user