fix password for muc. fixed #1940

parent f4c5e0a0
......@@ -970,10 +970,10 @@ class Gui(object):
return
room = room.lower()
if r and not r.joined:
self.xmpp.plugin['xep_0045'].joinMUC(room, nick, password)
muc.join_groupchat(self.xmpp, room, nick, password)
if not r: # if the room window exists, we don't recreate it.
self.open_new_room(room, nick)
self.xmpp.plugin['xep_0045'].joinMUC(room, nick, password)
muc.join_groupchat(self.xmpp, room, nick, password)
else:
r.own_nick = nick
r.users = []
......
......@@ -74,11 +74,11 @@ def change_nick(xmpp, jid, nick):
xmpp.makePresence(pto='%s/%s' % (jid, nick),
pfrom=xmpp.boundjid.bare).send()
def join_groupchat(xmpp, jid, nick, password=''):
def join_groupchat(xmpp, jid, nick, passwd=''):
"""
Join the groupchat
"""
xmpp.plugin['xep_0045'].joinMUC(jid, nick, password)
xmpp.plugin['xep_0045'].joinMUC(jid, nick, maxhistory=None, password=passwd)
def leave_groupchat(xmpp, jid, own_nick, msg):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment