mod_privacy_lists: Fix selecting the top resource (fixes #694)

Wed, 22 Jun 2016 22:27:22 +0200

author
Kim Alvefur <zash@zash.se>
date
Wed, 22 Jun 2016 22:27:22 +0200
changeset 2214
c2fc3516cca1
parent 2213
1815bf8b3cf9
child 2215
e276ed33bc1a

mod_privacy_lists: Fix selecting the top resource (fixes #694)

mod_privacy_lists/mod_privacy_lists.lua file | annotate | diff | comparison | revisions
--- a/mod_privacy_lists/mod_privacy_lists.lua	Tue Jun 14 19:02:00 2016 +0200
+++ b/mod_privacy_lists/mod_privacy_lists.lua	Wed Jun 22 22:27:22 2016 +0200
@@ -416,7 +416,7 @@
 			local prio = 0;
 			if bare_sessions[node.."@"..host] ~= nil then
 				for resource, session_ in pairs(bare_sessions[node.."@"..host].sessions) do
-					if session_.priority ~= nil and session_.priority > prio then
+					if session_.priority ~= nil and session_.priority >= prio then
 						session = session_;
 						prio = session_.priority;
 					end

mercurial