Commit 8c073827 authored by Jack'lul's avatar Jack'lul

Fix latest API update issue

parent ab9cc04c
......@@ -720,7 +720,9 @@ class DB
self::insertChat($chat, $date, $migrate_to_chat_id);
//Insert user and the relation with the chat
self::insertUser($from, $date, $chat);
if (is_object($from)) {
self::insertUser($from, $edit_date, $chat);
}
//Insert the forwarded message user in users table
if ($forward_from instanceof User) {
......@@ -769,7 +771,12 @@ class DB
');
$message_id = $message->getMessageId();
if (is_object($from)) {
$from_id = $from->getId();
} else {
$from_id = null;
}
$reply_to_message = $message->getReplyToMessage();
$reply_to_message_id = null;
......@@ -871,7 +878,9 @@ class DB
self::insertChat($chat, $edit_date);
//Insert user and the relation with the chat
if (is_object($from)) {
self::insertUser($from, $edit_date, $chat);
}
try {
$sth = self::$pdo->prepare('
......@@ -882,7 +891,12 @@ class DB
');
$message_id = $edited_message->getMessageId();
if (is_object($from)) {
$from_id = $from->getId();
} else {
$from_id = null;
}
$text = $edited_message->getText();
$caption = $edited_message->getCaption();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment