From 15de42a367af26973c2e3099537b86cf8f5ce054 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 23 Apr 2020 13:16:25 +0100 Subject: MUC: Always include 'affiliation'/'role' attributes, defaulting to 'none' if nil --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/muc/muc.lib.lua') 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 -- cgit v1.2.3