aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-01-22 22:01:00 +0300
committerGravatar Vitaly Takmazov2023-01-22 22:01:00 +0300
commitb7cd753624abb10933f388ca01ecc148a6b67846 (patch)
tree5025347d11351cdf0d4faf5b729f6ab837b4022c /src
parentb6db99da90ae4202ec58974a1e237aac6570e8a9 (diff)
Show message subscription state in API thread
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/juick/www/api/Messages.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/juick/www/api/Messages.java b/src/main/java/com/juick/www/api/Messages.java
index ecdd304f..7b54f126 100644
--- a/src/main/java/com/juick/www/api/Messages.java
+++ b/src/main/java/com/juick/www/api/Messages.java
@@ -161,7 +161,7 @@ public class Messages {
@GetMapping("/api/thread")
public List<Message> getThread(@Parameter(hidden = true) User visitor, @RequestParam(defaultValue = "0") int mid,
@RequestParam(defaultValue = "true") boolean showReplies) {
- Optional<Message> message = messagesService.getMessage(mid);
+ Optional<Message> message = messagesService.getMessage(visitor.getUid(), mid);
if (message.isPresent()) {
Message msg = message.get();
if (!messagesService.canViewThread(mid, visitor.getUid())) {