aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Messages.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Messages.java b/juick-server/src/main/java/com/juick/server/api/Messages.java
index 21156d79..87229131 100644
--- a/juick-server/src/main/java/com/juick/server/api/Messages.java
+++ b/juick-server/src/main/java/com/juick/server/api/Messages.java
@@ -17,6 +17,7 @@
package com.juick.server.api;
+import com.juick.Message;
import com.juick.Status;
import com.juick.Tag;
import com.juick.User;
@@ -143,6 +144,11 @@ public class Messages {
: null;
return ResponseEntity.ok(messagesService.getNotifications(visitor, beforeTime));
}
+ @GetMapping("/messages/discussions")
+ public List<Message> getDiscussions(
+ @RequestParam(required = false, defaultValue = "0") Long to) {
+ return messagesService.getMessages(messagesService.getDiscussions(UserUtils.getCurrentUser().getUid(), to));
+ }
@RequestMapping("/thread")
public ResponseEntity<List<com.juick.Message>> getThread(
@RequestParam(defaultValue = "0") int mid) {