From 79d1eeadf3cda6790e33c18e669cd8b8c3f12196 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 20 Dec 2022 21:06:27 +0300 Subject: API: do not append tags to replies --- src/main/java/com/juick/service/MessagesServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java index d0c89ad8..366d14f5 100644 --- a/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -92,8 +92,10 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ msg.setReplies(rs.getInt(10)); msg.setAttachmentType(rs.getString(11)); msg.Hidden = rs.getBoolean(13); - msg.setTags(tagService.getMessageTags(msg.getMid()).stream() - .map(tag -> tag.getTag()).collect(Collectors.toSet())); + if (msg.getRid() == 0) { + msg.setTags(tagService.getMessageTags(msg.getMid()).stream() + .map(TagStats::getTag).collect(Collectors.toSet())); + } msg.setRepliesBy(rs.getString(15)); msg.setText(rs.getString(16)); msg.setReplyQuote(MessageUtils.formatQuote(rs.getString(17))); -- cgit v1.2.3