aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-04-10 20:04:07 +0200
committerKim Alvefur <zash@zash.se>2017-04-10 20:04:07 +0200
commit680a633e0cb6cc4c94f60b99bd83ff727004f613 (patch)
treecaf8cd00ec66c803873167474745770360184aaf
parent3dad4dc1001d0a0405c3e443b1b7e161c8536152 (diff)
downloadprosody-680a633e0cb6cc4c94f60b99bd83ff727004f613.tar.gz
prosody-680a633e0cb6cc4c94f60b99bd83ff727004f613.zip
mod_presence: No need to overwrite index 1 since it's set on the line below
-rw-r--r--plugins/mod_presence.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua
index 2acc7db2..c5b2ae85 100644
--- a/plugins/mod_presence.lua
+++ b/plugins/mod_presence.lua
@@ -36,7 +36,7 @@ function handle_normal_presence(origin, stanza)
local priority = stanza:get_child("priority");
if priority and priority[1] ~= "0" then
for i=#priority.tags,1,-1 do priority.tags[i] = nil; end
- for i=#priority,1,-1 do priority[i] = nil; end
+ for i=#priority,2,-1 do priority[i] = nil; end
priority[1] = "0";
end
end