Rename premiumStatus to emojiStatus.
This commit is contained in:
parent
b8438b92ae
commit
14a9fda4ef
@ -497,11 +497,11 @@ chatAdministratorRights can_manage_chat:Bool can_change_info:Bool can_post_messa
|
||||
//@payment_link An internal link to be opened for buying Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available
|
||||
premiumPaymentOption currency:string amount:int53 discount_percentage:int32 month_count:int32 store_product_id:string payment_link:InternalLinkType = PremiumPaymentOption;
|
||||
|
||||
//@description Describes a custom emoji to be shown instead of the Telegram Premium badge @custom_emoji_id Identifier of the custom emoji in stickerFormatTgs format. If the custom emoji belongs to the sticker set GetOption("themed_premium_statuses_sticker_set_id"), then it's color must be changed to the color of the Telegram Premium badge
|
||||
premiumStatus custom_emoji_id:int64 = PremiumStatus;
|
||||
//@description Describes a custom emoji to be shown instead of the Telegram Premium badge @custom_emoji_id Identifier of the custom emoji in stickerFormatTgs format. If the custom emoji belongs to the sticker set GetOption("themed_emoji_statuses_sticker_set_id"), then it's color must be changed to the color of the Telegram Premium badge
|
||||
emojiStatus custom_emoji_id:int64 = EmojiStatus;
|
||||
|
||||
//@description Contains a list of premium statuses @premium_statuses The list of premium statuses
|
||||
premiumStatuses premium_statuses:vector<premiumStatus> = PremiumStatuses;
|
||||
//@description Contains a list of emoji statuses @emoji_statuses The list of emoji statuses
|
||||
emojiStatuses emoji_statuses:vector<emojiStatus> = EmojiStatuses;
|
||||
|
||||
|
||||
//@description Represents a user
|
||||
@ -512,7 +512,7 @@ premiumStatuses premium_statuses:vector<premiumStatus> = PremiumStatuses;
|
||||
//@phone_number Phone number of the user
|
||||
//@status Current online status of the user
|
||||
//@profile_photo Profile photo of the user; may be null
|
||||
//@premium_status Premium status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only
|
||||
//@emoji_status Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only
|
||||
//@is_contact The user is a contact of the current user
|
||||
//@is_mutual_contact The user is a contact of the current user and the current user is a contact of the user
|
||||
//@is_verified True, if the user is verified
|
||||
@ -525,7 +525,7 @@ premiumStatuses premium_statuses:vector<premiumStatus> = PremiumStatuses;
|
||||
//@type Type of the user
|
||||
//@language_code IETF language tag of the user's language; only available to bots
|
||||
//@added_to_attachment_menu True, if the user added the current bot to attachment menu; only available to bots
|
||||
user id:int53 first_name:string last_name:string username:string phone_number:string status:UserStatus profile_photo:profilePhoto premium_status:premiumStatus is_contact:Bool is_mutual_contact:Bool is_verified:Bool is_premium:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool have_access:Bool type:UserType language_code:string added_to_attachment_menu:Bool = User;
|
||||
user id:int53 first_name:string last_name:string username:string phone_number:string status:UserStatus profile_photo:profilePhoto emoji_status:emojiStatus is_contact:Bool is_mutual_contact:Bool is_verified:Bool is_premium:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool have_access:Bool type:UserType language_code:string added_to_attachment_menu:Bool = User;
|
||||
|
||||
|
||||
//@description Contains information about a bot
|
||||
@ -5608,17 +5608,17 @@ getAttachmentMenuBot bot_user_id:int53 = AttachmentMenuBot;
|
||||
toggleBotIsAddedToAttachmentMenu bot_user_id:int53 is_added:Bool = Ok;
|
||||
|
||||
|
||||
//@description Returns up to 8 themed premium statuses, which color must be changed to the color of the Telegram Premium badge
|
||||
getThemedPremiumStatuses = PremiumStatuses;
|
||||
//@description Returns up to 8 themed emoji statuses, which color must be changed to the color of the Telegram Premium badge
|
||||
getThemedEmojiStatuses = EmojiStatuses;
|
||||
|
||||
//@description Returns recent premium statuses
|
||||
getRecentPremiumStatuses = PremiumStatuses;
|
||||
//@description Returns recent emoji statuses
|
||||
getRecentEmojiStatuses = EmojiStatuses;
|
||||
|
||||
//@description Returns default premium statuses
|
||||
getDefaultPremiumStatuses = PremiumStatuses;
|
||||
//@description Returns default emoji statuses
|
||||
getDefaultEmojiStatuses = EmojiStatuses;
|
||||
|
||||
//@description Clears recent premium statuses
|
||||
clearRecentPremiumStatuses = Ok;
|
||||
//@description Clears recent emoji statuses
|
||||
clearRecentEmojiStatuses = Ok;
|
||||
|
||||
|
||||
//@description Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates
|
||||
@ -6127,10 +6127,10 @@ setBio bio:string = Ok;
|
||||
//@description Changes the username of the current user @username The new value of the username. Use an empty string to remove the username
|
||||
setUsername username:string = Ok;
|
||||
|
||||
//@description Changes the premium status of the current user; for Telegram Premium users only
|
||||
//@premium_status New premium status; pass null to switch to the default badge
|
||||
//@description Changes the emoji status of the current user; for Telegram Premium users only
|
||||
//@emoji_status New emoji status; pass null to switch to the default badge
|
||||
//@duration Duration of the status, in seconds; pass 0 to keep the status active until it will be changed manually
|
||||
setPremiumStatus premium_status:premiumStatus duration:int32 = Ok;
|
||||
setEmojiStatus emoji_status:emojiStatus duration:int32 = Ok;
|
||||
|
||||
//@description Changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer @location The new location of the user
|
||||
setLocation location:location = Ok;
|
||||
|
@ -1803,7 +1803,7 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
|
||||
}
|
||||
if (key == "default_emoji_statuses_stickerset_id") {
|
||||
auto setting_value = get_json_value_long(std::move(key_value->value_), key);
|
||||
G()->set_option_integer("themed_premium_statuses_sticker_set_id", setting_value);
|
||||
G()->set_option_integer("themed_emoji_statuses_sticker_set_id", setting_value);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -10384,7 +10384,7 @@ void ContactsManager::update_user(User *u, UserId user_id, bool from_binlog, boo
|
||||
auto until_date = u->emoji_status.get_until_date();
|
||||
auto left_time = until_date - unix_time;
|
||||
if (left_time >= 0 && left_time < 30 * 86400) {
|
||||
LOG(DEBUG) << "Set premium status timeout for " << user_id << " in " << left_time;
|
||||
LOG(DEBUG) << "Set emoji status timeout for " << user_id << " in " << left_time;
|
||||
user_emoji_status_timeout_.set_timeout_in(user_id.get(), left_time);
|
||||
} else {
|
||||
user_emoji_status_timeout_.cancel_timeout(user_id.get());
|
||||
@ -11805,13 +11805,13 @@ void ContactsManager::on_update_user_emoji_status(UserId user_id,
|
||||
on_update_user_emoji_status(u, user_id, EmojiStatus(std::move(emoji_status)));
|
||||
update_user(u, user_id);
|
||||
} else {
|
||||
LOG(INFO) << "Ignore update user premium status about unknown " << user_id;
|
||||
LOG(INFO) << "Ignore update user emoji status about unknown " << user_id;
|
||||
}
|
||||
}
|
||||
|
||||
void ContactsManager::on_update_user_emoji_status(User *u, UserId user_id, EmojiStatus emoji_status) {
|
||||
if (u->emoji_status != emoji_status) {
|
||||
LOG(DEBUG) << "Change premium status of " << user_id << " from " << u->emoji_status << " to " << emoji_status;
|
||||
LOG(DEBUG) << "Change emoji status of " << user_id << " from " << u->emoji_status << " to " << emoji_status;
|
||||
u->emoji_status = emoji_status;
|
||||
}
|
||||
}
|
||||
@ -16815,10 +16815,10 @@ tl_object_ptr<td_api::user> ContactsManager::get_user_object(UserId user_id, con
|
||||
type = make_tl_object<td_api::userTypeRegular>();
|
||||
}
|
||||
|
||||
auto premium_status = u->last_sent_emoji_status != 0 ? u->emoji_status.get_premium_status_object() : nullptr;
|
||||
auto emoji_status = u->last_sent_emoji_status != 0 ? u->emoji_status.get_emoji_status_object() : nullptr;
|
||||
return make_tl_object<td_api::user>(
|
||||
user_id.get(), u->first_name, u->last_name, u->username, u->phone_number, get_user_status_object(user_id, u),
|
||||
get_profile_photo_object(td_->file_manager_.get(), u->photo), std::move(premium_status), u->is_contact,
|
||||
get_profile_photo_object(td_->file_manager_.get(), u->photo), std::move(emoji_status), u->is_contact,
|
||||
u->is_mutual_contact, u->is_verified, u->is_premium, u->is_support,
|
||||
get_restriction_reason_description(u->restriction_reasons), u->is_scam, u->is_fake, u->is_received,
|
||||
std::move(type), u->language_code, u->attach_menu_enabled);
|
||||
|
@ -22,13 +22,13 @@ struct EmojiStatuses {
|
||||
int64 hash_ = 0;
|
||||
vector<EmojiStatus> emoji_statuses_;
|
||||
|
||||
td_api::object_ptr<td_api::premiumStatuses> get_premium_statuses_object() const {
|
||||
auto premium_statuses = transform(emoji_statuses_, [](const EmojiStatus &emoji_status) {
|
||||
td_api::object_ptr<td_api::emojiStatuses> get_emoji_statuses_object() const {
|
||||
auto emoji_statuses = transform(emoji_statuses_, [](const EmojiStatus &emoji_status) {
|
||||
CHECK(!emoji_status.is_empty());
|
||||
return emoji_status.get_premium_status_object();
|
||||
return emoji_status.get_emoji_status_object();
|
||||
});
|
||||
|
||||
return td_api::make_object<td_api::premiumStatuses>(std::move(premium_statuses));
|
||||
return td_api::make_object<td_api::emojiStatuses>(std::move(emoji_statuses));
|
||||
}
|
||||
|
||||
EmojiStatuses() = default;
|
||||
@ -39,11 +39,11 @@ struct EmojiStatuses {
|
||||
for (auto &status : emoji_statuses->statuses_) {
|
||||
EmojiStatus emoji_status(std::move(status));
|
||||
if (emoji_status.is_empty()) {
|
||||
LOG(ERROR) << "Receive empty premium status";
|
||||
LOG(ERROR) << "Receive empty emoji status";
|
||||
continue;
|
||||
}
|
||||
if (emoji_status.get_until_date() != 0) {
|
||||
LOG(ERROR) << "Receive temporary premium status";
|
||||
LOG(ERROR) << "Receive temporary emoji status";
|
||||
emoji_status.clear_until_date();
|
||||
}
|
||||
emoji_statuses_.push_back(emoji_status);
|
||||
@ -89,10 +89,10 @@ static void save_emoji_statuses(const string &key, const EmojiStatuses &emoji_st
|
||||
}
|
||||
|
||||
class GetDefaultEmojiStatusesQuery final : public Td::ResultHandler {
|
||||
Promise<td_api::object_ptr<td_api::premiumStatuses>> promise_;
|
||||
Promise<td_api::object_ptr<td_api::emojiStatuses>> promise_;
|
||||
|
||||
public:
|
||||
explicit GetDefaultEmojiStatusesQuery(Promise<td_api::object_ptr<td_api::premiumStatuses>> &&promise)
|
||||
explicit GetDefaultEmojiStatusesQuery(Promise<td_api::object_ptr<td_api::emojiStatuses>> &&promise)
|
||||
: promise_(std::move(promise)) {
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ class GetDefaultEmojiStatusesQuery final : public Td::ResultHandler {
|
||||
save_emoji_statuses(get_default_emoji_statuses_database_key(), emoji_statuses);
|
||||
|
||||
if (promise_) {
|
||||
promise_.set_value(emoji_statuses.get_premium_statuses_object());
|
||||
promise_.set_value(emoji_statuses.get_emoji_statuses_object());
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,10 +131,10 @@ class GetDefaultEmojiStatusesQuery final : public Td::ResultHandler {
|
||||
};
|
||||
|
||||
class GetRecentEmojiStatusesQuery final : public Td::ResultHandler {
|
||||
Promise<td_api::object_ptr<td_api::premiumStatuses>> promise_;
|
||||
Promise<td_api::object_ptr<td_api::emojiStatuses>> promise_;
|
||||
|
||||
public:
|
||||
explicit GetRecentEmojiStatusesQuery(Promise<td_api::object_ptr<td_api::premiumStatuses>> &&promise)
|
||||
explicit GetRecentEmojiStatusesQuery(Promise<td_api::object_ptr<td_api::emojiStatuses>> &&promise)
|
||||
: promise_(std::move(promise)) {
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ class GetRecentEmojiStatusesQuery final : public Td::ResultHandler {
|
||||
save_emoji_statuses(get_recent_emoji_statuses_database_key(), emoji_statuses);
|
||||
|
||||
if (promise_) {
|
||||
promise_.set_value(emoji_statuses.get_premium_statuses_object());
|
||||
promise_.set_value(emoji_statuses.get_emoji_statuses_object());
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,12 +198,12 @@ class ClearRecentEmojiStatusesQuery final : public Td::ResultHandler {
|
||||
}
|
||||
};
|
||||
|
||||
EmojiStatus::EmojiStatus(const td_api::object_ptr<td_api::premiumStatus> &premium_status, int32 duration) {
|
||||
if (premium_status == nullptr) {
|
||||
EmojiStatus::EmojiStatus(const td_api::object_ptr<td_api::emojiStatus> &emoji_status, int32 duration) {
|
||||
if (emoji_status == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
custom_emoji_id_ = premium_status->custom_emoji_id_;
|
||||
custom_emoji_id_ = emoji_status->custom_emoji_id_;
|
||||
if (duration != 0) {
|
||||
int32 current_time = G()->unix_time();
|
||||
if (duration >= std::numeric_limits<int32>::max() - current_time) {
|
||||
@ -247,11 +247,11 @@ tl_object_ptr<telegram_api::EmojiStatus> EmojiStatus::get_input_emoji_status() c
|
||||
return make_tl_object<telegram_api::emojiStatus>(custom_emoji_id_);
|
||||
}
|
||||
|
||||
td_api::object_ptr<td_api::premiumStatus> EmojiStatus::get_premium_status_object() const {
|
||||
td_api::object_ptr<td_api::emojiStatus> EmojiStatus::get_emoji_status_object() const {
|
||||
if (is_empty()) {
|
||||
return nullptr;
|
||||
}
|
||||
return td_api::make_object<td_api::premiumStatus>(custom_emoji_id_);
|
||||
return td_api::make_object<td_api::emojiStatus>(custom_emoji_id_);
|
||||
}
|
||||
|
||||
int64 EmojiStatus::get_effective_custom_emoji_id(bool is_premium, int32 unix_time) const {
|
||||
@ -275,20 +275,20 @@ StringBuilder &operator<<(StringBuilder &string_builder, const EmojiStatus &emoj
|
||||
return string_builder;
|
||||
}
|
||||
|
||||
void get_default_emoji_statuses(Td *td, Promise<td_api::object_ptr<td_api::premiumStatuses>> &&promise) {
|
||||
void get_default_emoji_statuses(Td *td, Promise<td_api::object_ptr<td_api::emojiStatuses>> &&promise) {
|
||||
auto statuses = load_emoji_statuses(get_default_emoji_statuses_database_key());
|
||||
if (statuses.hash_ != -1 && promise) {
|
||||
promise.set_value(statuses.get_premium_statuses_object());
|
||||
promise = Promise<td_api::object_ptr<td_api::premiumStatuses>>();
|
||||
promise.set_value(statuses.get_emoji_statuses_object());
|
||||
promise = Promise<td_api::object_ptr<td_api::emojiStatuses>>();
|
||||
}
|
||||
td->create_handler<GetDefaultEmojiStatusesQuery>(std::move(promise))->send(statuses.hash_);
|
||||
}
|
||||
|
||||
void get_recent_emoji_statuses(Td *td, Promise<td_api::object_ptr<td_api::premiumStatuses>> &&promise) {
|
||||
void get_recent_emoji_statuses(Td *td, Promise<td_api::object_ptr<td_api::emojiStatuses>> &&promise) {
|
||||
auto statuses = load_emoji_statuses(get_recent_emoji_statuses_database_key());
|
||||
if (statuses.hash_ != -1 && promise) {
|
||||
promise.set_value(statuses.get_premium_statuses_object());
|
||||
promise = Promise<td_api::object_ptr<td_api::premiumStatuses>>();
|
||||
promise.set_value(statuses.get_emoji_statuses_object());
|
||||
promise = Promise<td_api::object_ptr<td_api::emojiStatuses>>();
|
||||
}
|
||||
td->create_handler<GetRecentEmojiStatusesQuery>(std::move(promise))->send(statuses.hash_);
|
||||
}
|
||||
@ -299,7 +299,7 @@ void add_recent_emoji_status(Td *td, EmojiStatus emoji_status) {
|
||||
}
|
||||
|
||||
if (td->stickers_manager_->is_default_emoji_status(emoji_status.get_custom_emoji_id())) {
|
||||
LOG(INFO) << "Skip adding themed premium status to recents";
|
||||
LOG(INFO) << "Skip adding themed emoji status to recents";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -29,13 +29,13 @@ class EmojiStatus {
|
||||
public:
|
||||
EmojiStatus() = default;
|
||||
|
||||
EmojiStatus(const td_api::object_ptr<td_api::premiumStatus> &premium_status, int32 duration);
|
||||
EmojiStatus(const td_api::object_ptr<td_api::emojiStatus> &emoji_status, int32 duration);
|
||||
|
||||
explicit EmojiStatus(tl_object_ptr<telegram_api::EmojiStatus> &&emoji_status);
|
||||
|
||||
tl_object_ptr<telegram_api::EmojiStatus> get_input_emoji_status() const;
|
||||
|
||||
td_api::object_ptr<td_api::premiumStatus> get_premium_status_object() const;
|
||||
td_api::object_ptr<td_api::emojiStatus> get_emoji_status_object() const;
|
||||
|
||||
int64 get_effective_custom_emoji_id(bool is_premium, int32 unix_time) const;
|
||||
|
||||
@ -98,9 +98,9 @@ inline bool operator!=(const EmojiStatus &lhs, const EmojiStatus &rhs) {
|
||||
|
||||
StringBuilder &operator<<(StringBuilder &string_builder, const EmojiStatus &emoji_status);
|
||||
|
||||
void get_default_emoji_statuses(Td *td, Promise<td_api::object_ptr<td_api::premiumStatuses>> &&promise);
|
||||
void get_default_emoji_statuses(Td *td, Promise<td_api::object_ptr<td_api::emojiStatuses>> &&promise);
|
||||
|
||||
void get_recent_emoji_statuses(Td *td, Promise<td_api::object_ptr<td_api::premiumStatuses>> &&promise);
|
||||
void get_recent_emoji_statuses(Td *td, Promise<td_api::object_ptr<td_api::emojiStatuses>> &&promise);
|
||||
|
||||
void add_recent_emoji_status(Td *td, EmojiStatus emoji_status);
|
||||
|
||||
|
@ -102,10 +102,10 @@ OptionManager::OptionManager(Td *td)
|
||||
if (!have_option("chat_filter_chosen_chat_count_max")) {
|
||||
set_option_integer("chat_filter_chosen_chat_count_max", G()->is_test_dc() ? 5 : 100);
|
||||
}
|
||||
if (!have_option("themed_premium_statuses_sticker_set_id")) {
|
||||
if (!have_option("themed_emoji_statuses_sticker_set_id")) {
|
||||
auto sticker_set_id =
|
||||
G()->is_test_dc() ? static_cast<int64>(2964141614563343) : static_cast<int64>(773947703670341676);
|
||||
set_option_integer("themed_premium_statuses_sticker_set_id", sticker_set_id);
|
||||
set_option_integer("themed_emoji_statuses_sticker_set_id", sticker_set_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5460,14 +5460,14 @@ void StickersManager::get_all_animated_emojis(bool is_recursive,
|
||||
}
|
||||
|
||||
void StickersManager::get_default_emoji_statuses(bool is_recursive,
|
||||
Promise<td_api::object_ptr<td_api::premiumStatuses>> &&promise) {
|
||||
Promise<td_api::object_ptr<td_api::emojiStatuses>> &&promise) {
|
||||
TRY_STATUS_PROMISE(promise, G()->close_status());
|
||||
|
||||
auto &special_sticker_set = add_special_sticker_set(SpecialStickerSetType::default_statuses());
|
||||
auto sticker_set = get_sticker_set(special_sticker_set.id_);
|
||||
if (sticker_set == nullptr || !sticker_set->was_loaded_) {
|
||||
if (is_recursive) {
|
||||
return promise.set_value(td_api::make_object<td_api::premiumStatuses>());
|
||||
return promise.set_value(td_api::make_object<td_api::emojiStatuses>());
|
||||
}
|
||||
|
||||
pending_get_default_statuses_queries_.push_back(PromiseCreator::lambda(
|
||||
@ -5482,19 +5482,19 @@ void StickersManager::get_default_emoji_statuses(bool is_recursive,
|
||||
return;
|
||||
}
|
||||
|
||||
vector<td_api::object_ptr<td_api::premiumStatus>> statuses;
|
||||
vector<td_api::object_ptr<td_api::emojiStatus>> statuses;
|
||||
for (auto sticker_id : sticker_set->sticker_ids_) {
|
||||
auto custom_emoji_id = get_custom_emoji_id(sticker_id);
|
||||
if (custom_emoji_id == 0) {
|
||||
LOG(ERROR) << "Ignore wrong sticker " << sticker_id;
|
||||
continue;
|
||||
}
|
||||
statuses.emplace_back(td_api::make_object<td_api::premiumStatus>(custom_emoji_id));
|
||||
statuses.emplace_back(td_api::make_object<td_api::emojiStatus>(custom_emoji_id));
|
||||
if (statuses.size() >= 8) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
promise.set_value(td_api::make_object<td_api::premiumStatuses>(std::move(statuses)));
|
||||
promise.set_value(td_api::make_object<td_api::emojiStatuses>(std::move(statuses)));
|
||||
}
|
||||
|
||||
bool StickersManager::is_default_emoji_status(int64 custom_emoji_id) {
|
||||
|
@ -103,7 +103,7 @@ class StickersManager final : public Actor {
|
||||
|
||||
void get_all_animated_emojis(bool is_recursive, Promise<td_api::object_ptr<td_api::emojis>> &&promise);
|
||||
|
||||
void get_default_emoji_statuses(bool is_recursive, Promise<td_api::object_ptr<td_api::premiumStatuses>> &&promise);
|
||||
void get_default_emoji_statuses(bool is_recursive, Promise<td_api::object_ptr<td_api::emojiStatuses>> &&promise);
|
||||
|
||||
bool is_default_emoji_status(int64 custom_emoji_id);
|
||||
|
||||
|
@ -6746,31 +6746,31 @@ void Td::on_request(uint64 id, td_api::setUsername &request) {
|
||||
contacts_manager_->set_username(request.username_, std::move(promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, const td_api::setPremiumStatus &request) {
|
||||
void Td::on_request(uint64 id, const td_api::setEmojiStatus &request) {
|
||||
CHECK_IS_USER();
|
||||
CREATE_OK_REQUEST_PROMISE();
|
||||
contacts_manager_->set_emoji_status(EmojiStatus(request.premium_status_, request.duration_), std::move(promise));
|
||||
contacts_manager_->set_emoji_status(EmojiStatus(request.emoji_status_, request.duration_), std::move(promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, const td_api::getThemedPremiumStatuses &request) {
|
||||
void Td::on_request(uint64 id, const td_api::getThemedEmojiStatuses &request) {
|
||||
CHECK_IS_USER();
|
||||
CREATE_REQUEST_PROMISE();
|
||||
stickers_manager_->get_default_emoji_statuses(false, std::move(promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, const td_api::getDefaultPremiumStatuses &request) {
|
||||
void Td::on_request(uint64 id, const td_api::getDefaultEmojiStatuses &request) {
|
||||
CHECK_IS_USER();
|
||||
CREATE_REQUEST_PROMISE();
|
||||
get_default_emoji_statuses(this, std::move(promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, const td_api::getRecentPremiumStatuses &request) {
|
||||
void Td::on_request(uint64 id, const td_api::getRecentEmojiStatuses &request) {
|
||||
CHECK_IS_USER();
|
||||
CREATE_REQUEST_PROMISE();
|
||||
get_recent_emoji_statuses(this, std::move(promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, const td_api::clearRecentPremiumStatuses &request) {
|
||||
void Td::on_request(uint64 id, const td_api::clearRecentEmojiStatuses &request) {
|
||||
CHECK_IS_USER();
|
||||
CREATE_OK_REQUEST_PROMISE();
|
||||
clear_recent_emoji_statuses(this, std::move(promise));
|
||||
|
@ -1016,15 +1016,15 @@ class Td final : public Actor {
|
||||
|
||||
void on_request(uint64 id, td_api::setUsername &request);
|
||||
|
||||
void on_request(uint64 id, const td_api::setPremiumStatus &request);
|
||||
void on_request(uint64 id, const td_api::setEmojiStatus &request);
|
||||
|
||||
void on_request(uint64 id, const td_api::getThemedPremiumStatuses &request);
|
||||
void on_request(uint64 id, const td_api::getThemedEmojiStatuses &request);
|
||||
|
||||
void on_request(uint64 id, const td_api::getDefaultPremiumStatuses &request);
|
||||
void on_request(uint64 id, const td_api::getDefaultEmojiStatuses &request);
|
||||
|
||||
void on_request(uint64 id, const td_api::getRecentPremiumStatuses &request);
|
||||
void on_request(uint64 id, const td_api::getRecentEmojiStatuses &request);
|
||||
|
||||
void on_request(uint64 id, const td_api::clearRecentPremiumStatuses &request);
|
||||
void on_request(uint64 id, const td_api::clearRecentEmojiStatuses &request);
|
||||
|
||||
void on_request(uint64 id, td_api::setCommands &request);
|
||||
|
||||
|
@ -3444,7 +3444,7 @@ class CliClient final : public Actor {
|
||||
send_request(td_api::make_object<td_api::joinChatByInviteLink>(args));
|
||||
} else if (op == "gte") {
|
||||
send_request(td_api::make_object<td_api::getTextEntities>(args));
|
||||
} else if (op == "gtes") {
|
||||
} else if (op == "gtee") {
|
||||
execute(td_api::make_object<td_api::getTextEntities>(args));
|
||||
} else if (op == "pm") {
|
||||
send_request(
|
||||
@ -4485,22 +4485,22 @@ class CliClient final : public Actor {
|
||||
send_request(td_api::make_object<td_api::setBio>("\n" + args + "\n" + args + "\n"));
|
||||
} else if (op == "sun") {
|
||||
send_request(td_api::make_object<td_api::setUsername>(args));
|
||||
} else if (op == "spse") {
|
||||
send_request(td_api::make_object<td_api::setPremiumStatus>(nullptr, 0));
|
||||
} else if (op == "sps") {
|
||||
} else if (op == "sese") {
|
||||
send_request(td_api::make_object<td_api::setEmojiStatus>(nullptr, 0));
|
||||
} else if (op == "ses") {
|
||||
int64 custom_emoji_id;
|
||||
int32 until_date;
|
||||
get_args(args, custom_emoji_id, until_date);
|
||||
send_request(td_api::make_object<td_api::setPremiumStatus>(
|
||||
td_api::make_object<td_api::premiumStatus>(custom_emoji_id), until_date));
|
||||
} else if (op == "gtps") {
|
||||
send_request(td_api::make_object<td_api::getThemedPremiumStatuses>());
|
||||
} else if (op == "gdps") {
|
||||
send_request(td_api::make_object<td_api::getDefaultPremiumStatuses>());
|
||||
} else if (op == "grps") {
|
||||
send_request(td_api::make_object<td_api::getRecentPremiumStatuses>());
|
||||
} else if (op == "crps") {
|
||||
send_request(td_api::make_object<td_api::clearRecentPremiumStatuses>());
|
||||
send_request(td_api::make_object<td_api::setEmojiStatus>(
|
||||
td_api::make_object<td_api::emojiStatus>(custom_emoji_id), until_date));
|
||||
} else if (op == "gtes") {
|
||||
send_request(td_api::make_object<td_api::getThemedEmojiStatuses>());
|
||||
} else if (op == "gdes") {
|
||||
send_request(td_api::make_object<td_api::getDefaultEmojiStatuses>());
|
||||
} else if (op == "gres") {
|
||||
send_request(td_api::make_object<td_api::getRecentEmojiStatuses>());
|
||||
} else if (op == "cres") {
|
||||
send_request(td_api::make_object<td_api::clearRecentEmojiStatuses>());
|
||||
} else if (op == "ccun") {
|
||||
ChatId chat_id;
|
||||
string username;
|
||||
|
Loading…
Reference in New Issue
Block a user