Chat receive messages is now better

This commit is contained in:
Lars van Hijfte
2017-01-30 13:59:02 +01:00
parent c8450f3cb3
commit 54ddb78453
5 changed files with 29 additions and 19 deletions

View File

@@ -29,6 +29,12 @@ function selectLimitedFriends($userID, $limit) {
`friendship`.`user1ID` = `user`.`userID`) AND
`user`.`role` != 'banned' AND
`friendship`.`status` = 'confirmed'
ORDER BY
CASE
WHEN `friendship`.`user2ID` = `user`.`userID` THEN `friendship`.`chatLastVisted1`
WHEN `friendship`.`user1ID` = `user`.`userID` THEN `friendship`.`chatLastVisted2`
END
DESC
LIMIT :limitCount
");