Diff

mod_privacy_lists/mod_privacy_lists.lua @ 3009:a6fa44eeb818

mod_privacy_lists: Convert order to a string before using as attribute value (thanks ValdikSS)
author Matthew Wild <mwild1@gmail.com>
date Tue, 08 May 2018 17:59:02 +0100
parent 2214:c2fc3516cca1
line wrap: on
line diff
--- a/mod_privacy_lists/mod_privacy_lists.lua	Tue May 01 01:59:14 2018 +0200
+++ b/mod_privacy_lists/mod_privacy_lists.lua	Tue May 08 17:59:02 2018 +0100
@@ -214,7 +214,7 @@
 		if list then
 			reply = reply:tag("list", {name=list.name});
 			for _,item in ipairs(list.items) do
-				reply:tag("item", {type=item.type, value=item.value, action=item.action, order=item.order});
+				reply:tag("item", {type=item.type, value=item.value, action=item.action, order=("%d"):format(item.order)});
 				if item["message"] then reply:tag("message"):up(); end
 				if item["iq"] then reply:tag("iq"):up(); end
 				if item["presence-in"] then reply:tag("presence-in"):up(); end