jabber_mirror: Configure rooms after joining
(imported from commit d4c6e895dca1c7002ce39db81b671ba1c975d517)
This commit is contained in:
parent
32ec19cb12
commit
2d8910dc7e
|
@ -95,7 +95,20 @@ class JabberToZulipBot(ClientXMPP):
|
|||
logging.debug("Joining " + room)
|
||||
self.rooms.add(room)
|
||||
muc_jid = room + "@" + options.conference_domain
|
||||
self.plugin['xep_0045'].joinMUC(muc_jid, self.nick)
|
||||
xep0045 = self.plugin['xep_0045']
|
||||
xep0045.joinMUC(muc_jid, self.nick, wait=True)
|
||||
|
||||
# Configure the room. Really, we should only do this if the room is
|
||||
# newly created.
|
||||
form = None
|
||||
try:
|
||||
form = xep0045.getRoomConfig(muc_jid)
|
||||
except ValueError:
|
||||
pass
|
||||
if form:
|
||||
xep0045.configureRoom(muc_jid, form)
|
||||
else:
|
||||
logging.error("Could not configure room: " + muc_jid)
|
||||
|
||||
def leave_muc(self, room):
|
||||
if room not in self.rooms:
|
||||
|
|
Loading…
Reference in a new issue