From 22d30c3b50fe0ea4c18c45a4450fb1a8b1f1b1b8 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 9 Dec 2016 00:02:00 +0300 Subject: juick-notifications: fix reply notifications --- juick-api/src/main/java/com/juick/api/controllers/Notifications.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'juick-api/src/main') 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 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); } -- cgit v1.2.3