Check message IDs of messages received with getDiff

This commit is contained in:
Daniil Gentili 2019-05-30 15:25:56 +02:00
parent 32aff162e2
commit be11dcfef1

View File

@ -261,6 +261,12 @@ class FeedLoop extends ResumableSignalLoop
public function saveMessages($messages)
{
foreach ($messages as $message) {
if (!$this->API->check_msg_id($message)) {
$this->API->logger->logger("MSGID duplicate ({$message['id']}) in $this");
continue;
}
$this->parsedUpdates[] = ['_' => $this->channelId === false ? 'updateNewMessage' : 'updateNewChannelMessage', 'message' => $message, 'pts' => -1, 'pts_count' => -1];
}
}