mirror of
https://github.com/danielbrendel/hortusfox-web.git
synced 2026-01-06 12:50:11 -06:00
#130 Dynamic fetching & message type check
This commit is contained in:
@@ -88,7 +88,7 @@ class ChatMsgModel extends \Asatru\Database\Model {
|
||||
throw new \Exception('Invalid user');
|
||||
}
|
||||
|
||||
$result = static::raw('SELECT * FROM `' . self::tableName() . '` WHERE id > ? ORDER BY created_at DESC', [($user->get('last_seen_sysmsg')) ? $user->get('last_seen_sysmsg') : 0]);
|
||||
$result = static::raw('SELECT * FROM `' . self::tableName() . '` WHERE system = 1 AND id > ? ORDER BY created_at DESC', [($user->get('last_seen_sysmsg')) ? $user->get('last_seen_sysmsg') : 0]);
|
||||
if (($result) && (count($result) > 0)) {
|
||||
$msg = $result->get(count($result) - 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user