Software /
code /
prosody
Comparison
plugins/mod_privacy.lua @ 7459:94af49ad657e
mod_privacy: Fix selecting the top resource (fixes #694)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 22 Jun 2016 22:22:29 +0200 |
parent | 6365:75bd55e84112 |
child | 7460:726b088f9408 |
comparison
equal
deleted
inserted
replaced
7430:ad0b15f253ee | 7459:94af49ad657e |
---|---|
395 end | 395 end |
396 if resource == nil then | 396 if resource == nil then |
397 local prio = 0; | 397 local prio = 0; |
398 if bare_sessions[node.."@"..host] ~= nil then | 398 if bare_sessions[node.."@"..host] ~= nil then |
399 for resource, session_ in pairs(bare_sessions[node.."@"..host].sessions) do | 399 for resource, session_ in pairs(bare_sessions[node.."@"..host].sessions) do |
400 if session_.priority ~= nil and session_.priority > prio then | 400 if session_.priority ~= nil and session_.priority >= prio then |
401 session = session_; | 401 session = session_; |
402 prio = session_.priority; | 402 prio = session_.priority; |
403 end | 403 end |
404 end | 404 end |
405 end | 405 end |