aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-04-23 13:16:25 +0100
committerMatthew Wild <mwild1@gmail.com>2020-04-23 13:16:25 +0100
commit5e262dfdf6bdc94ac8a1b49c8c73124a90c6d1df (patch)
tree01fc665a0bdcfea14360041d8b0c2932e4b56632 /plugins/muc/muc.lib.lua
parent524ccf5c3f5457fe339a2c8b8a748ee5632dba9a (diff)
downloadprosody-5e262dfdf6bdc94ac8a1b49c8c73124a90c6d1df.tar.gz
prosody-5e262dfdf6bdc94ac8a1b49c8c73124a90c6d1df.zip
MUC: Always include 'affiliation'/'role' attributes, defaulting to 'none' if nil
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index bc370da5..93334b88 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -143,7 +143,7 @@ end
-- actor is the attribute table
local function add_item(x, affiliation, role, jid, nick, actor_nick, actor_jid, reason)
- x:tag("item", {affiliation = affiliation; role = role; jid = jid; nick = nick;})
+ x:tag("item", {affiliation = affiliation or "none"; role = role; jid = jid; nick = nick;})
if actor_nick or actor_jid then
x:tag("actor", {nick = actor_nick; jid = actor_jid;}):up()
end