More precise check in can_use_premium_custom_emoji.
This commit is contained in:
parent
2220d6bd32
commit
e12a1550d9
@ -5453,8 +5453,14 @@ bool ContactsManager::can_use_premium_custom_emoji(DialogId dialog_id) const {
|
||||
if (td_->option_manager_->get_option_boolean("is_premium")) {
|
||||
return true;
|
||||
}
|
||||
if (dialog_id.get_type() == DialogType::Channel && is_megagroup_channel(dialog_id.get_channel_id())) {
|
||||
return true;
|
||||
if (dialog_id.get_type() == DialogType::Channel) {
|
||||
auto channel_id = dialog_id.get_channel_id();
|
||||
if (is_megagroup_channel(channel_id)) {
|
||||
auto channel_full = get_channel_full_const(channel_id);
|
||||
if (channel_full == nullptr || channel_full->emoji_sticker_set_id.is_valid()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!td_->auth_manager_->is_bot()) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user