# HG changeset patch # User Matthew Wild # Date 1603376915 -3600 # Node ID a9be85b2da17b425b4cb64ad385efb341a071bba # Parent 4300839a28ca4bca5eee7c7eb250eed26ed6ca0e# Parent cf31a5ef8a9bcf64055b912095711fcc2deb1341 Merge diff -r 4300839a28ca -r a9be85b2da17 plugins/groupchat.lua --- 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);