From 47af4cca11a4a26b73a7f5eeb0a82fcae3145afc Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 31 Jan 2018 02:34:09 +0300 Subject: ws: send messages to authenticated services --- juick-ws/src/main/java/com/juick/ws/XMPPConnection.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'juick-ws/src/main') diff --git a/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java b/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java index be7f3899..e338bf66 100644 --- a/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java +++ b/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java @@ -162,6 +162,7 @@ public class XMPPConnection implements AutoCloseable { synchronized (wsHandler.getClients()) { wsHandler.getClients().stream().filter(c -> (!c.legacy && c.visitor.getUid() == 0) // anonymous users + || c.visitor.getName().equals(serviceUser) // services || (!c.legacy && uids.contains(c.visitor.getUid()))) // subscriptions .forEach(c -> { try { @@ -192,6 +193,7 @@ public class XMPPConnection implements AutoCloseable { synchronized (wsHandler.getClients()) { wsHandler.getClients().stream().filter(c -> (!c.legacy && c.visitor.getUid() == 0) // anonymous users + || c.visitor.getName().equals(serviceUser) // services || (!c.legacy && threadUsers.contains(c.visitor.getUid()))) // subscriptions .forEach(c -> { try { -- cgit v1.2.3