Changeset

11142:552cafd30eb2 0.11

MUC: Preserve disco 'node' attribute (or lack thereof) in response (fix #1595) (thanks lessthan3)
author Kim Alvefur <zash@zash.se>
date Wed, 07 Oct 2020 13:33:02 +0200
parents 11140:e17b98feb0b7
children 11143:818255f49297 11156:a8ef69f7fc35
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Mon Oct 05 22:12:29 2020 +0200
+++ b/plugins/muc/muc.lib.lua	Wed Oct 07 13:33:02 2020 +0200
@@ -336,12 +336,12 @@
 end
 
 function room_mt:get_disco_info(stanza)
-	local node = stanza.tags[1].attr.node or "";
+	local node = stanza.tags[1].attr.node;
 	local reply = st.reply(stanza):tag("query", { xmlns = "http://jabber.org/protocol/disco#info", node = node });
 	local event_name = "muc-disco#info";
 	local event_data = { room = self, reply = reply, stanza = stanza };
 
-	if node ~= "" then
+	if node and node ~= "" then
 		event_name = event_name.."/"..node;
 	else
 		event_data.form = dataform.new {