Software /
code /
verse
Changeset
436:a9be85b2da17
Merge
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 22 Oct 2020 15:28:35 +0100 |
parents | 434:4300839a28ca (current diff) 435:cf31a5ef8a9b (diff) |
children | 437:2762abec4c63 439:6fc73ad6b1d2 |
files | |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);