aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/Profile.java3
-rw-r--r--juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java8
2 files changed, 9 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java
index 6fdd9d8c..5a269d03 100644
--- a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java
+++ b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java
@@ -221,11 +221,12 @@ public class Profile {
}
throw new HttpNotFoundException();
}
+ /*
@GetMapping(value = "/m/{mid}", produces = {Context.LD_JSON_MEDIA_TYPE, Context.ACTIVITY_JSON_MEDIA_TYPE})
public Context showNote(@PathVariable int mid) {
Message message = messagesService.getMessage(mid);
return Context.build(activityPubManager.makeNote(message));
- }
+ }*/
@PostMapping(value = "/api/inbox", consumes = {Context.LD_JSON_MEDIA_TYPE, Context.ACTIVITY_JSON_MEDIA_TYPE})
public ResponseEntity<Void> processInbox(@RequestBody Activity activity,
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 b0707232..e83e2705 100644
--- a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -392,7 +392,13 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
msg.setTo(quoteUser);
}
msg.setUpdatedAt(rs.getTimestamp(10).toInstant());
-
+ if (StringUtils.isNotEmpty(msg.getAttachmentType())) {
+ try {
+ imagesService.setAttachmentMetadata(baseImagesUrl, msg);
+ } catch (Exception e) {
+ logger.warn("exception reading images for mid {} rid {}", msg.getMid(), msg.getRid(), e);
+ }
+ }
return msg;
},
mid, rid);