Changeset

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
parents 8070:2db6746d2df8
children 8072:194409dcba22
files plugins/mod_presence.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_presence.lua	Mon Apr 10 10:30:31 2017 +0200
+++ b/plugins/mod_presence.lua	Mon Apr 10 20:04:07 2017 +0200
@@ -36,7 +36,7 @@
 		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