diff options
author | Vitaly Takmazov | 2023-12-08 14:06:24 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-12-08 14:06:24 +0300 |
commit | 45733cbe5a0d247c017c37a82be24efc7d7b9db7 (patch) | |
tree | c2a352f8eb42770675707e1b37d63dae34b501e4 /src/main/java/com/juick/service | |
parent | a695bb077af4f34bd0a085fe077bee39d0fa5d1e (diff) |
Do not show private messages to @ugnich
Diffstat (limited to 'src/main/java/com/juick/service')
-rw-r--r-- | src/main/java/com/juick/service/MessagesServiceImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java index 454b2aa0..78197a0f 100644 --- a/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -516,7 +516,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ return getNamedParameterJdbcTemplate().queryForList("SELECT m.message_id FROM messages m WHERE " + (before > 0 ? " m.message_id < :before AND " : StringUtils.EMPTY) + " m.hidden = 0 AND (m.privacy > 0" - + (visitorUid > 1 ? " OR m.user_id = :visitorUid) AND NOT EXISTS (" + + (visitorUid > 0 ? " OR m.user_id = :visitorUid) AND NOT EXISTS (" + " SELECT 1 FROM bl_users b WHERE b.user_id = :visitorUid AND b.bl_user_id = m.user_id)" : ")") + " AND NOT EXISTS (SELECT 1 FROM bl_tags bt WHERE bt.tag_id IN " + "(SELECT tag_id FROM messages_tags WHERE message_id = m.message_id) and :visitorUid = bt.user_id)" |