Fix pinned message notification when mention notifications are disabled.
GitOrigin-RevId: ba7fe3965f9afa50a062f786c90997ed9951e1eb
This commit is contained in:
parent
2ab9393a1d
commit
b3d3075c08
@ -22548,13 +22548,13 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (*need_update) {
|
if (*need_update) {
|
||||||
if (message_content_type == MessageContentType::PinMessage &&
|
if (message_content_type == MessageContentType::PinMessage) {
|
||||||
(is_dialog_pinned_message_notifications_disabled(d) ||
|
if (is_dialog_pinned_message_notifications_disabled(d) ||
|
||||||
!get_message_content_pinned_message_id(message->content.get()).is_valid())) {
|
!get_message_content_pinned_message_id(message->content.get()).is_valid()) {
|
||||||
// treat message pin without pinned message as an ordinary message
|
// treat message pin without pinned message as an ordinary message
|
||||||
message->contains_mention = false;
|
message->contains_mention = false;
|
||||||
}
|
}
|
||||||
if (message->contains_mention && is_dialog_mention_notifications_disabled(d)) {
|
} else if (message->contains_mention && is_dialog_mention_notifications_disabled(d)) {
|
||||||
// disable mention notification
|
// disable mention notification
|
||||||
message->is_mention_notification_disabled = true;
|
message->is_mention_notification_disabled = true;
|
||||||
}
|
}
|
||||||
@ -24994,7 +24994,7 @@ void MessagesManager::on_get_channel_dialog(DialogId dialog_id, MessageId last_m
|
|||||||
CHECK(last_full_message_id == added_full_message_id);
|
CHECK(last_full_message_id == added_full_message_id);
|
||||||
CHECK(d->last_message_id == d->last_new_message_id);
|
CHECK(d->last_message_id == d->last_new_message_id);
|
||||||
} else {
|
} else {
|
||||||
LOG(ERROR) << added_full_message_id << " doesn't became last new message";
|
LOG(ERROR) << added_full_message_id << " doesn't became last new message, which is " << d->last_new_message_id;
|
||||||
dump_debug_message_op(d, 2);
|
dump_debug_message_op(d, 2);
|
||||||
}
|
}
|
||||||
} else if (last_message_id.get() > d->last_new_message_id.get()) {
|
} else if (last_message_id.get() > d->last_new_message_id.get()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user