MUC: Use empty string if no subject provided (thanks pep+)
authorMatthew Wild <mwild1@gmail.com>
Fri, 16 Mar 2018 17:36:49 +0000
changeset 8609 b6b1f0f9b381
parent 8608 3a1efc0532cb
child 8610 62bb06cf8a43
MUC: Use empty string if no subject provided (thanks pep+)
plugins/muc/subject.lib.lua
--- a/plugins/muc/subject.lib.lua	Fri Mar 16 17:13:57 2018 +0000
+++ b/plugins/muc/subject.lib.lua	Fri Mar 16 17:36:49 2018 +0000
@@ -14,7 +14,7 @@
 
 local function create_subject_message(from, subject)
 	return st.message({from = from; type = "groupchat"})
-		:tag("subject"):text(subject):up();
+		:tag("subject"):text(subject or ""):up();
 end
 
 local function get_changesubject(room)