Store random_id in internal secret message database

This commit is contained in:
Daniil Gentili 2018-07-19 18:42:30 +02:00
parent 6fcd5247b1
commit badc751a0f

View File

@ -25,6 +25,7 @@ trait MessageHandler
return false;
}
$message['random_id'] = $this->random(8);
$this->secret_chats[$chat_id]['ttr']--;
if ($this->secret_chats[$chat_id]['layer'] > 8) {
if (($this->secret_chats[$chat_id]['ttr'] <= 0 || time() - $this->secret_chats[$chat_id]['updated'] > 7 * 24 * 60 * 60) && $this->secret_chats[$chat_id]['rekeying'][0] === 0) {