aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Notifications.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Notifications.java b/juick-server/src/main/java/com/juick/server/api/Notifications.java
index bc3d98bf..62275f5a 100644
--- a/juick-server/src/main/java/com/juick/server/api/Notifications.java
+++ b/juick-server/src/main/java/com/juick/server/api/Notifications.java
@@ -81,6 +81,7 @@ public class Notifications {
return ResponseEntity.ok(Collections.singletonList(collectTokens(uid)));
} else {
if (mid > 0) {
+ // reply
Message msg = messagesService.getMessage(mid);
if (msg != null) {
List<User> users;
@@ -95,6 +96,9 @@ public class Notifications {
return ResponseEntity.ok(users.stream().map(User::getUid)
.map(this::collectTokens).collect(Collectors.toList()));
}
+ } else {
+ // read
+ return ResponseEntity.ok(Collections.singletonList(collectTokens(uid)));
}
}
throw new HttpBadRequestException();