Software /
code /
prosody-modules
Comparison
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 |
comparison
equal
deleted
inserted
replaced
3008:26fe44c68791 | 3009:a6fa44eeb818 |
---|---|
212 else | 212 else |
213 local list = privacy_lists.lists[name]; | 213 local list = privacy_lists.lists[name]; |
214 if list then | 214 if list then |
215 reply = reply:tag("list", {name=list.name}); | 215 reply = reply:tag("list", {name=list.name}); |
216 for _,item in ipairs(list.items) do | 216 for _,item in ipairs(list.items) do |
217 reply:tag("item", {type=item.type, value=item.value, action=item.action, order=item.order}); | 217 reply:tag("item", {type=item.type, value=item.value, action=item.action, order=("%d"):format(item.order)}); |
218 if item["message"] then reply:tag("message"):up(); end | 218 if item["message"] then reply:tag("message"):up(); end |
219 if item["iq"] then reply:tag("iq"):up(); end | 219 if item["iq"] then reply:tag("iq"):up(); end |
220 if item["presence-in"] then reply:tag("presence-in"):up(); end | 220 if item["presence-in"] then reply:tag("presence-in"):up(); end |
221 if item["presence-out"] then reply:tag("presence-out"):up(); end | 221 if item["presence-out"] then reply:tag("presence-out"):up(); end |
222 reply:up(); | 222 reply:up(); |