Comparison

plugins/muc/muc.lib.lua @ 10757:9dec7cddb40b

Merge 0.11->trunk
author Matthew Wild <mwild1@gmail.com>
date Thu, 23 Apr 2020 13:52:19 +0100
parent 10712:dc24a8783c5d
parent 10753:925081396c59
child 10804:4dc57789f51b
comparison
equal deleted inserted replaced
10728:2764beb552cd 10757:9dec7cddb40b
142 stanza.attr.to = to; 142 stanza.attr.to = to;
143 end 143 end
144 144
145 -- actor is the attribute table 145 -- actor is the attribute table
146 local function add_item(x, affiliation, role, jid, nick, actor_nick, actor_jid, reason) 146 local function add_item(x, affiliation, role, jid, nick, actor_nick, actor_jid, reason)
147 x:tag("item", {affiliation = affiliation; role = role; jid = jid; nick = nick;}) 147 x:tag("item", {affiliation = affiliation or "none"; role = role; jid = jid; nick = nick;})
148 if actor_nick or actor_jid then 148 if actor_nick or actor_jid then
149 x:tag("actor", {nick = actor_nick; jid = actor_jid;}):up() 149 x:tag("actor", {nick = actor_nick; jid = actor_jid;}):up()
150 end 150 end
151 if reason then 151 if reason then
152 x:tag("reason"):text(reason):up() 152 x:tag("reason"):text(reason):up()