aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-02-09 13:48:11 +0000
committerMatthew Wild <mwild1@gmail.com>2009-02-09 13:48:11 +0000
commit88a1586f95d1cc04a48f4e6012bfa93d3c4caaa2 (patch)
treeaec584ad7a1e3602fe3db2aa053ad3edc963492b
parentaf27b13805d574106b81330890f81d94695e5edc (diff)
downloadprosody-88a1586f95d1cc04a48f4e6012bfa93d3c4caaa2.tar.gz
prosody-88a1586f95d1cc04a48f4e6012bfa93d3c4caaa2.zip
stanza_router: Fix for when clients don't specify priority in initial presence
-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};