Exclude private messages when counting unread group messages.

This commit is contained in:
akwizgran
2013-03-11 17:58:43 +00:00
parent 89087a32c3
commit 768bd8d603

View File

@@ -2183,6 +2183,7 @@ abstract class JdbcDatabase implements Database<Connection> {
String sql = "SELECT groupId, COUNT(*)"
+ " FROM messages AS m"
+ " WHERE read = FALSE"
+ " AND groupId IS NOT NULL"
+ " GROUP BY groupId";
ps = txn.prepareStatement(sql);
rs = ps.executeQuery();