diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 7e39cbca3..bb5da7b6f 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -1175,21 +1175,21 @@ class CliClient final : public Actor { struct StoryPrivacySettings { string settings; + vector user_ids; operator td_api::object_ptr() const { if (settings == "f" || settings == "cf") { return td_api::make_object(); } if (!settings.empty()) { - auto user_ids = to_integers(Slice(settings).substr(1)); if (settings[0] == 'a' || settings[0] == 'e') { - return td_api::make_object(std::move(user_ids)); + return td_api::make_object(vector(user_ids)); } if (settings[0] == 'c') { - return td_api::make_object(std::move(user_ids)); + return td_api::make_object(vector(user_ids)); } if (settings[0] == 'u') { - return td_api::make_object(std::move(user_ids)); + return td_api::make_object(vector(user_ids)); } } return td_api::make_object(); @@ -1198,6 +1198,9 @@ class CliClient final : public Actor { void get_args(string &args, StoryPrivacySettings &arg) const { arg.settings = trim(args); + if (!arg.settings.empty() && arg.settings != "cf") { + arg.user_ids = as_user_ids(Slice(arg.settings).substr(1)); + } } template