Unverified Commit 9ae0cdea authored by Armando Lüscher's avatar Armando Lüscher Committed by GitHub

Merge pull request #967 from noplanman/427-fix_forward_date

Save forward_date correctly to the DB.
parents 1785d98f f4b67e64
...@@ -9,6 +9,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c ...@@ -9,6 +9,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
### Deprecated ### Deprecated
### Removed ### Removed
### Fixed ### Fixed
- `forward_date` is now correctly saved to the DB.
### Security ### Security
## [0.57.0] - 2019-06-01 ## [0.57.0] - 2019-06-01
......
...@@ -881,18 +881,17 @@ class DB ...@@ -881,18 +881,17 @@ class DB
} }
// Insert the forwarded message user in users table // Insert the forwarded message user in users table
$forward_date = null; $forward_date = $message->getForwardDate() ? self::getTimestamp($message->getForwardDate()) : null;
$forward_from = $message->getForwardFrom(); $forward_from = $message->getForwardFrom();
if ($forward_from instanceof User) { if ($forward_from instanceof User) {
self::insertUser($forward_from, $forward_date); self::insertUser($forward_from);
$forward_from = $forward_from->getId(); $forward_from = $forward_from->getId();
$forward_date = self::getTimestamp($message->getForwardDate());
} }
$forward_from_chat = $message->getForwardFromChat(); $forward_from_chat = $message->getForwardFromChat();
if ($forward_from_chat instanceof Chat) { if ($forward_from_chat instanceof Chat) {
self::insertChat($forward_from_chat, $forward_date); self::insertChat($forward_from_chat);
$forward_from_chat = $forward_from_chat->getId(); $forward_from_chat = $forward_from_chat->getId();
$forward_date = self::getTimestamp($message->getForwardDate());
} }
// New and left chat member // New and left chat member
......
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