Commit 191a3b1e authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Improved "only available" logic to consider server as the sender.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8522 b35dd754-fafc-0310-a699-88a17e54d16e
parent d3b1632b
...@@ -193,13 +193,13 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable, Clust ...@@ -193,13 +193,13 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable, Clust
// Packet sent to local user (full JID) // Packet sent to local user (full JID)
boolean onlyAvailable = true; boolean onlyAvailable = true;
if (packet instanceof IQ) { if (packet instanceof IQ) {
onlyAvailable = packet.getFrom() != null; onlyAvailable = packet.getFrom() != null && !serverName.equals(packet.getFrom().toString());
} }
else if (packet instanceof Message) { else if (packet instanceof Message) {
onlyAvailable = true; onlyAvailable = packet.getFrom() == null || !serverName.equals(packet.getFrom().toString());
} }
else if (packet instanceof Presence) { else if (packet instanceof Presence) {
onlyAvailable = true; onlyAvailable = packet.getFrom() == null || !serverName.equals(packet.getFrom().toString());
} }
ClientRoute clientRoute = usersCache.get(jid.toString()); ClientRoute clientRoute = usersCache.get(jid.toString());
if (clientRoute == null) { if (clientRoute == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment