1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 23:11:19 +01:00

Merge pull request #902 from danog/lower_message_level

Lower level of "Consider syncing your date" message
This commit is contained in:
Alexander Pankratov 2021-03-01 01:07:55 +03:00 committed by GitHub
commit 01e5352052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -75,11 +75,11 @@ class MsgIdHandler32 extends MsgIdHandler
$key = $this->getMaxId($incoming = true);
if ($aargs['container']) {
if ($newMessageId->compare($key = $this->getMaxId($incoming = true)) >= 0) {
$this->session->API->logger->logger('WARNING: Given message id ('.$newMessageId.') is bigger than or equal to the current limit ('.$key.'). Consider syncing your date.', \danog\MadelineProto\Logger::WARNING);
$this->session->API->logger->logger('Given message id ('.$newMessageId.') is bigger than or equal to the current limit ('.$key.'). Consider syncing your date.', \danog\MadelineProto\Logger::NOTICE);
}
} else {
if ($newMessageId->compare($key = $this->getMaxId($incoming = true)) <= 0) {
$this->session->API->logger->logger('WARNING: Given message id ('.$newMessageId.') is lower than or equal to the current limit ('.$key.'). Consider syncing your date.', \danog\MadelineProto\Logger::WARNING);
$this->session->API->logger->logger('Given message id ('.$newMessageId.') is lower than or equal to the current limit ('.$key.'). Consider syncing your date.', \danog\MadelineProto\Logger::NOTICE);
}
}
$this->cleanup(true);

View File

@ -74,11 +74,11 @@ class MsgIdHandler64 extends MsgIdHandler
$key = $this->maxIncomingId;
if ($aargs['container']) {
if ($newMessageId >= $key) {
$this->session->API->logger->logger('WARNING: Given message id ('.$newMessageId.') is bigger than or equal to the current limit ('.$key.'). Consider syncing your date.', \danog\MadelineProto\Logger::WARNING);
$this->session->API->logger->logger('Given message id ('.$newMessageId.') is bigger than or equal to the current limit ('.$key.'). Consider syncing your date.', \danog\MadelineProto\Logger::NOTICE);
}
} else {
if ($newMessageId <= $key) {
$this->session->API->logger->logger('WARNING: Given message id ('.$newMessageId.') is lower than or equal to the current limit ('.$key.'). Consider syncing your date.', \danog\MadelineProto\Logger::WARNING);
$this->session->API->logger->logger('Given message id ('.$newMessageId.') is lower than or equal to the current limit ('.$key.'). Consider syncing your date.', \danog\MadelineProto\Logger::NOTICE);
}
}
$this->cleanup(true);