diff options
Diffstat (limited to 'juick-server-jdbc/src/main/java')
-rw-r--r-- | juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java index 751b7fc3f..721bfb4e9 100644 --- a/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -859,8 +859,8 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ "n.user_id, users.nick, users.banned, 0 as ago, n.ts, 0 as readonly, 0 as privacy, " + "0 as replies, n.attach, 0 as place_id, 0 as lat, 0 as lon, 0 as likes, 0 as hidden, " + "NULL as tags, NULL as repliesby, n.txt, IFNULL(qw.txt, t.txt) as q " + - "FROM (SELECT * FROM replies WHERE EXISTS (SELECT 1 FROM subscr_messages WHERE suser_id=3694 " + - "AND replies.user_id!=3694 AND replies.message_id=message_id " + + "FROM (SELECT * FROM replies WHERE EXISTS (SELECT 1 FROM subscr_messages WHERE suser_id=:uid " + + "AND replies.user_id!=:uid AND replies.message_id=message_id " + (before != null ? "AND replies.ts < :before " : StringUtils.EMPTY) + ")) as n LEFT JOIN users " + "ON n.user_id = users.id LEFT JOIN replies qw ON n.message_id = qw.message_id " + |