From 88a1586f95d1cc04a48f4e6012bfa93d3c4caaa2 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 9 Feb 2009 13:48:11 +0000 Subject: stanza_router: Fix for when clients don't specify priority in initial presence --- core/stanza_router.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') 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}; -- cgit v1.2.3