diff options
author | 2013-12-20 00:48:41 +0700 | |
---|---|---|
committer | 2013-12-20 00:48:41 +0700 | |
commit | a6b3956014a894ff4e8e1d9194c10869e5911e34 (patch) | |
tree | aba077d5d371621f1e49f9ea87edb59ea34d39dc /src | |
parent | dded0cfb7c3b6c356e0d8703c1ebdea24924eb5e (diff) |
Don't send post to it's author
Diffstat (limited to 'src')
-rw-r--r-- | src/com/juick/server/SubscriptionsQueries.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/juick/server/SubscriptionsQueries.java b/src/com/juick/server/SubscriptionsQueries.java index ca382fc7..20540b93 100644 --- a/src/com/juick/server/SubscriptionsQueries.java +++ b/src/com/juick/server/SubscriptionsQueries.java @@ -49,9 +49,10 @@ public class SubscriptionsQueries { PreparedStatement stmt = null; ResultSet rs = null; try { - stmt = sql.prepareStatement("SELECT DISTINCT jid FROM jids WHERE active=1 AND user_id IN (SELECT suser_id FROM subscr_users WHERE user_id=? UNION SELECT suser_id FROM subscr_tags INNER JOIN messages_tags ON (messages_tags.message_id=? AND subscr_tags.tag_id=messages_tags.tag_id))"); + stmt = sql.prepareStatement("SELECT DISTINCT jid FROM jids WHERE active=1 AND user_id!=? AND user_id IN (SELECT suser_id FROM subscr_users WHERE user_id=? UNION SELECT suser_id FROM subscr_tags INNER JOIN messages_tags ON (messages_tags.message_id=? AND subscr_tags.tag_id=messages_tags.tag_id))"); stmt.setInt(1, uid); - stmt.setInt(2, mid); + stmt.setInt(2, uid); + stmt.setInt(3, mid); rs = stmt.executeQuery(); rs.beforeFirst(); while (rs.next()) { |