aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-04-09 23:11:18 +0300
committerGravatar Vitaly Takmazov2019-04-09 23:11:34 +0300
commit18094466ae8aae8a5c2e74fa18ba3f49d2c9fabf (patch)
tree06419aa1571be1a6f40d3da33755b81bd5e30431 /src/main/java/com/juick
parent0880615c6211f7e0f3d54f3e9247772b69b09267 (diff)
Fix likes counter while fixing tests on mysql
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/service/MessagesServiceImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java
index ce9185d9..5e36093e 100644
--- a/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -372,7 +372,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
+ "messages.readonly, messages.privacy, messages.replies,"
+ "messages.attach, COUNT(DISTINCT favorites.user_id) as likes, messages.hidden,"
+ "GROUP_CONCAT(tags.name SEPARATOR ' '), txt.repliesby, txt.txt, '' as q, messages.updated as updated, 0 as to_uid, "
- + "NULL as to_name, txt.updated_at, '' as user_uri, '' as to_uri, '' as reply_uri, 0 as html FROM messages "
+ + "NULL as to_name, txt.updated_at, '' as reply_user_uri, '' as to_uri, '' as reply_uri, 0 as html FROM messages "
+ "INNER JOIN users ON messages.user_id = users.id "
+ "INNER JOIN messages_txt AS txt "
+ "ON messages.message_id = txt.message_id "
@@ -382,7 +382,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
+ "LEFT JOIN tags ON tags.tag_id=messages_tags.tag_id "
+ "WHERE messages.message_id = ? "
+ "GROUP BY mid, rid, replyto, uid, nick, banned, messages.ts, readonly, "
- + "privacy, replies, attach, repliesby, q, updated_at, user_uri, to_uri, reply_uri, html",
+ + "privacy, replies, attach, repliesby, q, updated_at, reply_user_uri, to_uri, reply_uri, html",
new MessageMapper(),
mid);
if (!list.isEmpty()) {