aboutsummaryrefslogtreecommitdiffstats
path: root/core/stanza_router.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/stanza_router.lua')
-rw-r--r--core/stanza_router.lua19
1 files changed, 0 insertions, 19 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 6dc667fc..eddeb9cd 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -31,8 +31,6 @@ local jid_split = require "util.jid".split;
local jid_prepped_split = require "util.jid".prepped_split;
local fire_event = prosody.events.fire_event;
-local select_best_resources;
-
function core_process_stanza(origin, stanza)
(origin.log or log)("debug", "Received[%s]: %s", origin.type, stanza:top_tag())
@@ -231,20 +229,3 @@ function core_route_stanza(origin, stanza)
end
stanza.attr.to = to; -- reset
end
-
-function select_best_resources(user)
- local priority = 0;
- local recipients = {};
- for _, session in pairs(user.sessions) do -- find resource with greatest priority
- if session.presence then
- local p = session.priority;
- if p > priority then
- priority = p;
- recipients = {session};
- elseif p == priority then
- t_insert(recipients, session);
- end
- end
- end
- return recipients;
-end