Commit b75ef60f authored by dloser's avatar dloser
Browse files

Fixed unread count to include new conversations

parent 953651d8
......@@ -60,7 +60,7 @@
LEFT JOIN pm_messages
ON message_id = (SELECT message_id FROM pm_messages WHERE pm_messages.pm_id = pm_users.pm_id ORDER BY time DESC LIMIT 1)
WHERE pm_users.user_id = :userID
AND pm_messages.time > pm_users.seen
AND (pm_users.seen IS NULL OR pm_messages.time > pm_users.seen)
');
$stmt->execute(array(':userID' => \dtw\DtW::getInstance()->user->id));
$count = $stmt->fetch(\PDO::FETCH_COLUMN);
......
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