Comparison

plugins/mod_presence.lua @ 8071:c3790ca4144f

mod_presence: No need to overwrite index 1 since it's set on the line below
author Kim Alvefur <zash@zash.se>
date Mon, 10 Apr 2017 20:04:07 +0200
parent 7779:b1f80447a2b1
child 8072:194409dcba22
comparison
equal deleted inserted replaced
8070:2db6746d2df8 8071:c3790ca4144f
34 function handle_normal_presence(origin, stanza) 34 function handle_normal_presence(origin, stanza)
35 if ignore_presence_priority then 35 if ignore_presence_priority then
36 local priority = stanza:get_child("priority"); 36 local priority = stanza:get_child("priority");
37 if priority and priority[1] ~= "0" then 37 if priority and priority[1] ~= "0" then
38 for i=#priority.tags,1,-1 do priority.tags[i] = nil; end 38 for i=#priority.tags,1,-1 do priority.tags[i] = nil; end
39 for i=#priority,1,-1 do priority[i] = nil; end 39 for i=#priority,2,-1 do priority[i] = nil; end
40 priority[1] = "0"; 40 priority[1] = "0";
41 end 41 end
42 end 42 end
43 local priority = stanza:get_child("priority"); 43 local priority = stanza:get_child("priority");
44 if priority and #priority > 0 then 44 if priority and #priority > 0 then