diff options
author | Vitaly Takmazov | 2016-12-09 00:02:00 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-12-09 00:02:00 +0300 |
commit | 22d30c3b50fe0ea4c18c45a4450fb1a8b1f1b1b8 (patch) | |
tree | f79493ff675aa4c546b4a9a835998fbe8f457398 /juick-api/src/main/java/com/juick | |
parent | eaf87f0422af1a1f86526ea9218cd2193202af64 (diff) |
juick-notifications: fix reply notifications
Diffstat (limited to 'juick-api/src/main/java/com/juick')
-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 fb89e472..ff3679c0 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); } |