Merge

Thu, 22 Oct 2020 15:28:35 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 22 Oct 2020 15:28:35 +0100
changeset 436
a9be85b2da17
parent 434
4300839a28ca (current diff)
parent 435
cf31a5ef8a9b (diff)
child 437
2762abec4c63
child 439
6fc73ad6b1d2

Merge

--- a/plugins/groupchat.lua	Thu Oct 22 15:28:09 2020 +0100
+++ b/plugins/groupchat.lua	Thu Oct 22 15:28:35 2020 +0100
@@ -38,7 +38,7 @@
 		end
 	end, 500);
 
-	function stream:join_room(jid, nick, opts)
+	function stream:join_room(jid, nick, opts, password)
 		if not nick then
 			return false, "no nickname supplied"
 		end
@@ -104,6 +104,9 @@
 			end
 		end, 2000);
 		local join_st = verse.presence():tag("x",{xmlns = xmlns_muc}):reset();
+		if password then
+			join_st:get_child("x", xmlns_muc):tag("password"):text(password):reset();
+		end
 		self:event("pre-groupchat/joining", join_st);
 		room:send(join_st)
 		self:event("groupchat/joining", room);

mercurial