Mercurial > prosody-modules
comparison mod_privacy_lists/mod_privacy_lists.lua @ 2214:c2fc3516cca1
mod_privacy_lists: Fix selecting the top resource (fixes #694)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 22 Jun 2016 22:27:22 +0200 |
| parents | 5410f5c30d63 |
| children | a6fa44eeb818 |
comparison
equal
deleted
inserted
replaced
| 2213:1815bf8b3cf9 | 2214:c2fc3516cca1 |
|---|---|
| 414 end | 414 end |
| 415 if resource == nil then | 415 if resource == nil then |
| 416 local prio = 0; | 416 local prio = 0; |
| 417 if bare_sessions[node.."@"..host] ~= nil then | 417 if bare_sessions[node.."@"..host] ~= nil then |
| 418 for resource, session_ in pairs(bare_sessions[node.."@"..host].sessions) do | 418 for resource, session_ in pairs(bare_sessions[node.."@"..host].sessions) do |
| 419 if session_.priority ~= nil and session_.priority > prio then | 419 if session_.priority ~= nil and session_.priority >= prio then |
| 420 session = session_; | 420 session = session_; |
| 421 prio = session_.priority; | 421 prio = session_.priority; |
| 422 end | 422 end |
| 423 end | 423 end |
| 424 end | 424 end |
