Add Chat.background_custom_emoji_id.
This commit is contained in:
parent
a2a226ac42
commit
d02a9fe5c3
|
@ -973,6 +973,9 @@ class Client::JsonChat final : public td::Jsonable {
|
||||||
}
|
}
|
||||||
CHECK(chat_info->accent_color_id != -1);
|
CHECK(chat_info->accent_color_id != -1);
|
||||||
object("accent_color_id", chat_info->accent_color_id);
|
object("accent_color_id", chat_info->accent_color_id);
|
||||||
|
if (chat_info->background_custom_emoji_id != 0) {
|
||||||
|
object("background_custom_emoji_id", td::to_string(chat_info->background_custom_emoji_id));
|
||||||
|
}
|
||||||
if (chat_info->has_protected_content) {
|
if (chat_info->has_protected_content) {
|
||||||
object("has_protected_content", td::JsonTrue());
|
object("has_protected_content", td::JsonTrue());
|
||||||
}
|
}
|
||||||
|
@ -5948,6 +5951,7 @@ void Client::on_update(object_ptr<td_api::Object> result) {
|
||||||
chat_info->permissions = std::move(chat->permissions_);
|
chat_info->permissions = std::move(chat->permissions_);
|
||||||
chat_info->message_auto_delete_time = chat->message_auto_delete_time_;
|
chat_info->message_auto_delete_time = chat->message_auto_delete_time_;
|
||||||
chat_info->accent_color_id = chat->accent_color_id_;
|
chat_info->accent_color_id = chat->accent_color_id_;
|
||||||
|
chat_info->background_custom_emoji_id = chat->background_custom_emoji_id_;
|
||||||
chat_info->has_protected_content = chat->has_protected_content_;
|
chat_info->has_protected_content = chat->has_protected_content_;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -5986,6 +5990,13 @@ void Client::on_update(object_ptr<td_api::Object> result) {
|
||||||
chat_info->accent_color_id = update->accent_color_id_;
|
chat_info->accent_color_id = update->accent_color_id_;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case td_api::updateChatBackgroundCustomEmoji::ID: {
|
||||||
|
auto update = move_object_as<td_api::updateChatBackgroundCustomEmoji>(result);
|
||||||
|
auto chat_info = add_chat(update->chat_id_);
|
||||||
|
CHECK(chat_info->type != ChatInfo::Type::Unknown);
|
||||||
|
chat_info->background_custom_emoji_id = update->background_custom_emoji_id_;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case td_api::updateChatHasProtectedContent::ID: {
|
case td_api::updateChatHasProtectedContent::ID: {
|
||||||
auto update = move_object_as<td_api::updateChatHasProtectedContent>(result);
|
auto update = move_object_as<td_api::updateChatHasProtectedContent>(result);
|
||||||
auto chat_info = add_chat(update->chat_id_);
|
auto chat_info = add_chat(update->chat_id_);
|
||||||
|
|
|
@ -892,6 +892,7 @@ class Client final : public WebhookActor::Callback {
|
||||||
td::string title;
|
td::string title;
|
||||||
int32 message_auto_delete_time = 0;
|
int32 message_auto_delete_time = 0;
|
||||||
int32 accent_color_id = -1;
|
int32 accent_color_id = -1;
|
||||||
|
int64 background_custom_emoji_id = 0;
|
||||||
bool has_protected_content = false;
|
bool has_protected_content = false;
|
||||||
object_ptr<td_api::chatPhotoInfo> photo_info;
|
object_ptr<td_api::chatPhotoInfo> photo_info;
|
||||||
object_ptr<td_api::chatPermissions> permissions;
|
object_ptr<td_api::chatPermissions> permissions;
|
||||||
|
|
Loading…
Reference in New Issue