From b7cd753624abb10933f388ca01ecc148a6b67846 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 22 Jan 2023 22:01:00 +0300 Subject: Show message subscription state in API thread --- src/main/java/com/juick/www/api/Messages.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/com') 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 getThread(@Parameter(hidden = true) User visitor, @RequestParam(defaultValue = "0") int mid, @RequestParam(defaultValue = "true") boolean showReplies) { - Optional message = messagesService.getMessage(mid); + Optional message = messagesService.getMessage(visitor.getUid(), mid); if (message.isPresent()) { Message msg = message.get(); if (!messagesService.canViewThread(mid, visitor.getUid())) { -- cgit v1.2.3