mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Fix localtime-related slowmode errors.
This commit is contained in:
@@ -561,8 +561,12 @@ void ApiWrap::sendMessageFail(
|
||||
const auto left = error.type().mid(chop).toInt();
|
||||
if (const auto channel = peer->asChannel()) {
|
||||
const auto seconds = channel->slowmodeSeconds();
|
||||
channel->growSlowmodeLastMessage(
|
||||
base::unixtime::now() - (left - seconds));
|
||||
if (seconds >= left) {
|
||||
channel->growSlowmodeLastMessage(
|
||||
base::unixtime::now() - (left - seconds));
|
||||
} else {
|
||||
requestFullPeer(peer);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (const auto item = _session->data().message(itemId)) {
|
||||
|
Reference in New Issue
Block a user