Commit 9522ff9f authored by Luke Ward's avatar Luke Ward
Browse files

Merge branch 'fix-unread-for-new-convos' into 'master'

Fixed unread count to include new conversations

See merge request !5
parents 953651d8 b75ef60f
......@@ -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