From a4ec3fdb1b7d2c7188fa24ea4826c928f4e7b22a Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 19 Oct 2017 10:37:30 +0300 Subject: xmpp: instruction for inactive jids --- juick-xmpp/src/main/java/com/juick/components/JuickBot.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/juick-xmpp/src/main/java/com/juick/components/JuickBot.java b/juick-xmpp/src/main/java/com/juick/components/JuickBot.java index 5df24d16..8a82063a 100644 --- a/juick-xmpp/src/main/java/com/juick/components/JuickBot.java +++ b/juick-xmpp/src/main/java/com/juick/components/JuickBot.java @@ -138,6 +138,9 @@ public class JuickBot implements StanzaListener, AutoCloseable { reply.setFrom(p.getTo().withResource(jid.getResource())); reply.setTo(p.getFrom()); reply.setPriority((byte)10); + if (!userService.getActiveJIDs().contains(p.getFrom().asBareJid().toEscapedString())) { + reply.setStatus("Send ON to enable notifications"); + } xmpp.sendOut(ClientPresence.from(reply)); } else { Presence reply = new Presence(); -- cgit v1.2.3