Mercurial > prosody-hg
comparison plugins/mod_presence.lua @ 7265:78be11bf62bf
mod_presence: Use type-specific config API for boolean 'ignore_presence_priority' option
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 11 Mar 2016 13:13:20 +0100 |
| parents | 2aae36312eb9 |
| children | 051279755cad |
comparison
equal
deleted
inserted
replaced
| 7264:6d97895c2bd7 | 7265:78be11bf62bf |
|---|---|
| 49 user.top_resources = select_top_resources(user); | 49 user.top_resources = select_top_resources(user); |
| 50 if #user.top_resources == 0 then user.top_resources = nil; end | 50 if #user.top_resources == 0 then user.top_resources = nil; end |
| 51 end | 51 end |
| 52 end | 52 end |
| 53 | 53 |
| 54 local ignore_presence_priority = module:get_option("ignore_presence_priority"); | 54 local ignore_presence_priority = module:get_option_boolean("ignore_presence_priority", false); |
| 55 | 55 |
| 56 function handle_normal_presence(origin, stanza) | 56 function handle_normal_presence(origin, stanza) |
| 57 if ignore_presence_priority then | 57 if ignore_presence_priority then |
| 58 local priority = stanza:get_child("priority"); | 58 local priority = stanza:get_child("priority"); |
| 59 if priority and priority[1] ~= "0" then | 59 if priority and priority[1] ~= "0" then |
