diff options
Diffstat (limited to 'juick-api/src/main')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/controllers/Notifications.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/juick-api/src/main/java/com/juick/api/controllers/Notifications.java b/juick-api/src/main/java/com/juick/api/controllers/Notifications.java index fb89e4724..ff3679c07 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/Notifications.java +++ b/juick-api/src/main/java/com/juick/api/controllers/Notifications.java @@ -51,7 +51,8 @@ public class Notifications { if ((visitor.getUid() == 0) || !(visitor.getName().equals("juick"))) { throw new HttpForbiddenException(); } - if (uid > 0) { + if (uid > 0 && mid == 0) { + // PM switch (type) { case "gcm": return ResponseEntity.ok(pushQueriesService.getGCMRegID(uid)); @@ -69,7 +70,7 @@ public class Notifications { if (msg != null) { List<User> users; if (msg.getRid() > 0) { - users = subscriptionService.getUsersSubscribedToComments(mid, msg.getUser().getUid()); + users = subscriptionService.getUsersSubscribedToComments(mid, uid); } else { users = subscriptionService.getSubscribedUsers(msg.getUser().getUid(), mid); } |