Commit 705864ad authored by Dave Cridland's avatar Dave Cridland

Merge pull request #85 from kost/really-route-all

Really route to all resources
parents 632b3018 0ac3b680
...@@ -534,17 +534,21 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable, Clust ...@@ -534,17 +534,21 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable, Clust
return false; return false;
} }
// Get the highest priority sessions for normal processing.
List<ClientSession> highestPrioritySessions = getHighestPrioritySessions(nonNegativePrioritySessions);
// Check for message carbons enabled sessions and send the message to them. // Check for message carbons enabled sessions and send the message to them.
for (ClientSession session : nonNegativePrioritySessions) { for (ClientSession session : nonNegativePrioritySessions) {
// Deliver to each session, if is message carbons enabled. // Deliver to each session, if is message carbons enabled.
if (shouldCarbonCopyToResource(session, packet, isPrivate)) { if (shouldCarbonCopyToResource(session, packet, isPrivate)) {
session.process(packet); session.process(packet);
// Deliver to each session if property route.really-all-resources is true
// (in case client does not support carbons)
} else if (JiveGlobals.getBooleanProperty("route.really-all-resources", false)) {
session.process(packet);
} }
} }
// Get the highest priority sessions for normal processing.
List<ClientSession> highestPrioritySessions = getHighestPrioritySessions(nonNegativePrioritySessions);
if (highestPrioritySessions.size() == 1) { if (highestPrioritySessions.size() == 1) {
// Found only one session so deliver message (if it hasn't already been processed because it has message carbons enabled) // Found only one session so deliver message (if it hasn't already been processed because it has message carbons enabled)
if (!shouldCarbonCopyToResource(highestPrioritySessions.get(0), packet, isPrivate)) { if (!shouldCarbonCopyToResource(highestPrioritySessions.get(0), packet, isPrivate)) {
......
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