Broadcast the presence update to all subscribers of the roter.
Any presence change typically results in a broadcast to the roster members.
9899100101102103104105106107108
User user = server.getUserByConnection(connection); if (status != null) { user.setStatus(status); } user.setShow(show); room.broadcastPresence(jid.getName(), null); } } } @Override
117118119120121122123124125126127
for (String other : room.getUserList()) { if (!other.equals(jid.getName())) { user.sendPresence(room, jid.getName(), other, null); } } room.broadcastPresence(jid.getName(), null); } else if (ret == 0) { // The nick already existed, send a conflict. user.sendPresenceConflict(room, to); return false; }
135136137138139140141142143144145
if (to != null) { Jid jid = new Jid(to); if (jid.isUser()) { Room room = server.getRoom(jid.getRoom()); User user = server.getUserByConnection(connection); room.broadcastPresence(jid.getName(), "unavailable"); user.exitRoom(room); } } }
301302303304305306307308309310311
// Local updates can simply run through the roster of the local user String name = update.getFrom().getNode(); try { if (name != null && !"".equals(name)) { Roster roster = rosterManager.getRoster(name); roster.broadcastPresence(update); } } catch (UserNotFoundException e) { Log.warn("Presence being sent from unknown user " + name, e); }