diff mod_minimix/mod_minimix.lua @ 3119:f84a6ad72548

mod_minimix: Handle missing subject
author Kim Alvefur <zash@zash.se>
date Tue, 19 Jun 2018 18:56:57 +0200
parents 24e49391d4e8
children b914ee44b49f
line wrap: on
line diff
--- a/mod_minimix/mod_minimix.lua	Tue Jun 19 18:28:41 2018 +0200
+++ b/mod_minimix/mod_minimix.lua	Tue Jun 19 18:56:57 2018 +0200
@@ -36,7 +36,10 @@
 				origin.send(st.clone(pres));
 			end
 			-- FIXME should send ones own presence last
-			origin.send(st.clone(data:get(username, room_jid, "subject")));
+			local subject = data:get(username, room_jid, "subject");
+			if subject then
+				origin.send(st.clone(subject));
+			end
 			-- Send on-join stanzas from local state, somehow
 			-- Maybe tell them their nickname was changed if it doesn't match the account one
 			return true;