From 6de0c5eb668f8c435dc121cf4a85465612e0ee6b Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 23 Oct 2018 11:56:56 +0300 Subject: ActivityPub: create replies for nested external replies --- .../src/main/java/com/juick/service/MessagesServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'juick-server/src/main/java/com/juick/service') 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 1d52e48a..65a4f116 100644 --- a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -436,6 +436,12 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ return list.isEmpty() ? null : list.get(0); } + @Override + public Message getReplyByUri(String replyUri) { + List replies = getJdbcTemplate().query("SELECT message_id, reply_id from replies WHERE reply_uri=?", (rs, rowNum) -> getReply(rs.getInt(1), rs.getInt(2)), replyUri); + return replies.isEmpty() ? null : replies.get(0); + } + @Transactional(readOnly = true) @Override public User getMessageAuthor(final int mid) { -- cgit v1.2.3