diff options
author | Vitaly Takmazov | 2022-12-20 21:06:27 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2022-12-20 21:06:27 +0300 |
commit | 79d1eeadf3cda6790e33c18e669cd8b8c3f12196 (patch) | |
tree | 331fd7ace4a9524e533805260cd5658c06c72dcd /src/main/java/com/juick | |
parent | 80063166dcd0bfbbc43f4be59061abc179edbaf9 (diff) |
API: do not append tags to replies
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r-- | src/main/java/com/juick/service/MessagesServiceImpl.java | 6 |
1 files changed, 4 insertions, 2 deletions
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))); |