aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/juick/ws/XMPPConnection.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/com/juick/ws/XMPPConnection.java b/src/main/java/com/juick/ws/XMPPConnection.java
index 8194862c..a6f4e2cb 100644
--- a/src/main/java/com/juick/ws/XMPPConnection.java
+++ b/src/main/java/com/juick/ws/XMPPConnection.java
@@ -120,6 +120,14 @@ public class XMPPConnection implements Runnable, Stream.StreamListener, Message.
logger.log(Level.WARNING, "ws error", e);
}
});
+ ws.clients.stream().filter(c -> c.legacy && c.allMessages).forEach(c -> {
+ try {
+ logger.info("sending message to legacy client " + c.visitor.getUID());
+ c.session.sendMessage(new TextMessage(json));
+ } catch (IOException e) {
+ logger.log(Level.WARNING, "ws error", e);
+ }
+ });
}
}
@@ -138,6 +146,14 @@ public class XMPPConnection implements Runnable, Stream.StreamListener, Message.
logger.log(Level.WARNING, "ws error", e);
}
});
+ ws.clients.stream().filter(c -> (c.legacy && c.allReplies) || (c.legacy && c.MID == jmsg.getMID())).forEach(c -> {
+ try {
+ logger.info("sending reply to legacy client " + c.visitor.getUID());
+ c.session.sendMessage(new TextMessage(json));
+ } catch (IOException e) {
+ logger.log(Level.WARNING, "ws error", e);
+ }
+ });
}
}
}