aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/stanza_router.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 3c905c6d..89e6a77f 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -202,7 +202,7 @@ function core_route_stanza(origin, stanza)
local priority = 0;
local recipients = {};
for _, session in pairs(user.sessions) do -- find resource with greatest priority
- local p = session.priority;
+ local p = session.priority or -1;
if p > priority then
priority = p;
recipients = {session};