aboutsummaryrefslogtreecommitdiff
path: root/src/com/juick/server/PMQueries.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/juick/server/PMQueries.java')
-rw-r--r--src/com/juick/server/PMQueries.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/juick/server/PMQueries.java b/src/com/juick/server/PMQueries.java
index 6399802f..b0c2911a 100644
--- a/src/com/juick/server/PMQueries.java
+++ b/src/com/juick/server/PMQueries.java
@@ -159,7 +159,7 @@ public class PMQueries {
if (users.size() < cnt) {
try {
- stmt = sql.prepareStatement("SELECT user_id,user_id_to FROM pm_streams WHERE user_id=? OR user_id_to=? ORDER BY lastmessage DESC LIMIT ?");
+ stmt = sql.prepareStatement("SELECT user_id,user_id_to FROM pm_streams WHERE (user_id=? OR user_id_to=?) AND lastmessage>TIMESTAMPADD(MONTH,-1,NOW()) ORDER BY lastmessage DESC LIMIT ?");
stmt.setInt(1, uid);
stmt.setInt(2, uid);
stmt.setInt(3, cnt * 2);