aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/MessengerManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-20 11:36:13 +0300
committerGravatar Vitaly Takmazov2018-03-20 11:36:13 +0300
commitbe91c5f5771282f2798cb687f915b0df44eaa59e (patch)
tree1d216e62851bf7cdc065a73d3a6d3d55e3137775 /juick-server/src/main/java/com/juick/server/MessengerManager.java
parent4a1e9c4d8868ad1f14cd1c8df57db80bfbd897ce (diff)
jdbc: no more notifications from banned users
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/MessengerManager.java')
-rw-r--r--juick-server/src/main/java/com/juick/server/MessengerManager.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/juick-server/src/main/java/com/juick/server/MessengerManager.java b/juick-server/src/main/java/com/juick/server/MessengerManager.java
index 14a43d6a..1fe04aca 100644
--- a/juick-server/src/main/java/com/juick/server/MessengerManager.java
+++ b/juick-server/src/main/java/com/juick/server/MessengerManager.java
@@ -112,12 +112,11 @@ public class MessengerManager implements ApplicationListener<MessageEvent> {
.forEach(user -> messengerService.getSenderId(user)
.ifPresent(t -> messengerNotify(t, subject, formatUrl(msg))));
} else if (msg.getRid() > 0) {
- // get quote
- com.juick.Message jmsg = messagesService.getReply(msg.getMid(), msg.getRid());
- String subject = formatPost(jmsg);
- subscriptionService.getUsersSubscribedToComments(msg.getMid(), msg.getUser().getUid())
+ Message op = messagesService.getMessage(msg.getMid());
+ String subject = formatPost(msg);
+ subscriptionService.getUsersSubscribedToComments(op, msg)
.forEach(user -> messengerService.getSenderId(user)
- .ifPresent(t -> messengerNotify(t, subject, formatUrl(jmsg))));
+ .ifPresent(t -> messengerNotify(t, subject, formatUrl(msg))));
}
}