Fix setting group emoji status.

This commit is contained in:
John Preston 2025-06-05 11:40:05 +04:00
parent 11986ac698
commit 3cfdc9d897

View file

@ -574,15 +574,15 @@ void Set(
MTP_flags(Flag::f_color | Flag::f_background_emoji_id),
MTP_int(values.colorIndex),
MTP_long(values.backgroundEmojiId)));
} else if (peer->isMegagroup()) {
} else if (const auto channel = peer->asChannel()) {
using Flag = MTPchannels_UpdateColor::Flag;
send(MTPchannels_UpdateColor(
MTP_flags(Flag::f_color | Flag::f_background_emoji_id),
channel->inputChannel,
MTP_int(values.colorIndex),
MTP_long(values.backgroundEmojiId)));
if (peer->isBroadcast()) {
using Flag = MTPchannels_UpdateColor::Flag;
send(MTPchannels_UpdateColor(
MTP_flags(Flag::f_color | Flag::f_background_emoji_id),
channel->inputChannel,
MTP_int(values.colorIndex),
MTP_long(values.backgroundEmojiId)));
}
if (values.statusChanged
&& (values.statusId || peer->emojiStatusId())) {
peer->owner().emojiStatuses().set(