Upated xep_0045 to use old_0004 for now.

This commit is contained in:
Lance Stout 2010-07-20 13:23:35 -04:00
parent b67b930596
commit 75afefb5c6

View file

@ -154,13 +154,13 @@ class xep_0045(base.base_plugin):
return False return False
xform = result.xml.find('{http://jabber.org/protocol/muc#owner}query/{jabber:x:data}x') xform = result.xml.find('{http://jabber.org/protocol/muc#owner}query/{jabber:x:data}x')
if xform is None: return False if xform is None: return False
form = self.xmpp.plugin['xep_0004'].buildForm(xform) form = self.xmpp.plugin['old_0004'].buildForm(xform)
return form return form
def configureRoom(self, room, form=None, ifrom=None): def configureRoom(self, room, form=None, ifrom=None):
if form is None: if form is None:
form = self.getRoomForm(room, ifrom=ifrom) form = self.getRoomForm(room, ifrom=ifrom)
#form = self.xmpp.plugin['xep_0004'].makeForm(ftype='submit') #form = self.xmpp.plugin['old_0004'].makeForm(ftype='submit')
#form.addField('FORM_TYPE', value='http://jabber.org/protocol/muc#roomconfig') #form.addField('FORM_TYPE', value='http://jabber.org/protocol/muc#roomconfig')
iq = self.xmpp.makeIqSet() iq = self.xmpp.makeIqSet()
iq['to'] = room iq['to'] = room
@ -262,7 +262,7 @@ class xep_0045(base.base_plugin):
form = result.xml.find('{http://jabber.org/protocol/muc#owner}query/{jabber:x:data}x') form = result.xml.find('{http://jabber.org/protocol/muc#owner}query/{jabber:x:data}x')
if form is None: if form is None:
raise ValueError raise ValueError
return self.xmpp.plugin['xep_0004'].buildForm(form) return self.xmpp.plugin['old_0004'].buildForm(form)
def cancelConfig(self, room): def cancelConfig(self, room):
query = ET.Element('{http://jabber.org/protocol/muc#owner}query') query = ET.Element('{http://jabber.org/protocol/muc#owner}query')