2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Fix localtime-related slowmode errors.

This commit is contained in:
John Preston
2019-08-20 12:42:13 +03:00
parent 1a06714f3a
commit e1fe373504
9 changed files with 35 additions and 25 deletions

View File

@@ -1242,16 +1242,12 @@ void History::newItemAdded(not_null<HistoryItem*> item) {
}
from->madeAction(item->date());
}
item->contributeToSlowmode();
if (item->out()) {
destroyUnreadBar();
if (!item->unread()) {
outboxRead(item);
}
if (const auto channel = peer->asChannel()) {
if (IsServerMsgId(item->id)) {
channel->growSlowmodeLastMessage(item->date());
}
}
} else if (item->unread()) {
if (!isChannel() || peer->asChannel()->amIn()) {
_notifications.push_back(item);