diff options
author | Vitaly Takmazov | 2018-10-07 13:14:33 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-10-07 13:14:33 +0300 |
commit | ae2b7552bda919e7eb505139eb417656ae2568a1 (patch) | |
tree | f484dda786eda1acbf1a99836fb2a5dd54d9bcbe /juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java | |
parent | 1dbaac46c7205c184ff2365031d918083b2dce57 (diff) |
ActivityPub: fix inReplyTo serialization
Diffstat (limited to 'juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java')
-rw-r--r-- | juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java index bb8e43f1..62cdff0c 100644 --- a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -367,7 +367,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ + "replies.attach, replies.txt, IFNULL(q.txt,t.txt) as quote, " + "COALESCE(q.user_id, m.user_id) AS to_uid, COALESCE(qu.nick, mu.nick) AS to_name, " + "replies.updated_at, replies.user_uri as uri, " - + "q.user_uri AS to_uri, replies.reply_uri AS reply_uri, replies.html " + + "q.user_uri AS to_uri, replies.reply_uri AS reply_uri, replies.html, q.reply_uri " + "FROM replies LEFT JOIN users ON replies.user_id = users.id " + "LEFT JOIN replies q ON replies.message_id = q.message_id and replies.replyto = q.reply_id " + "LEFT JOIN messages_txt t ON replies.message_id = t.message_id " @@ -401,11 +401,12 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ User quoteUser = new User(); quoteUser.setUid(quoteUid); quoteUser.setName(Optional.ofNullable(rs.getString(9)).orElse(AnonymousUser.INSTANCE.getName())); - quoteUser.setUri(URI.create(Optional.ofNullable(rs.getString(11)).orElse(StringUtils.EMPTY))); + quoteUser.setUri(URI.create(Optional.ofNullable(rs.getString(12)).orElse(StringUtils.EMPTY))); msg.setTo(quoteUser); msg.setUpdatedAt(rs.getTimestamp(10).toInstant()); - msg.setReplyUri(URI.create(Optional.ofNullable(rs.getString(12)).orElse(StringUtils.EMPTY))); - msg.setHtml(rs.getBoolean(13)); + msg.setReplyUri(URI.create(Optional.ofNullable(rs.getString(13)).orElse(StringUtils.EMPTY))); + msg.setHtml(rs.getBoolean(14)); + msg.setReplyToUri(URI.create(Optional.ofNullable(rs.getString(15)).orElse(StringUtils.EMPTY))); if (StringUtils.isNotEmpty(msg.getAttachmentType())) { try { imagesService.setAttachmentMetadata(baseImagesUrl, msg); |