Use boundjid in plugins instead of the deprecated accessors.

Originally contributed by skinkie, with a few modifications.
This commit is contained in:
Lance Stout
2010-12-16 15:38:00 -05:00
parent e81683beee
commit 67775fb8bd
5 changed files with 21 additions and 21 deletions

View File

@@ -271,7 +271,7 @@ class xep_0045(base.base_plugin):
def invite(self, room, jid, reason=''):
""" Invite a jid to a room."""
msg = self.xmpp.makeMessage(room)
msg['from'] = self.xmpp.jid
msg['from'] = self.xmpp.boundjid.bare
x = ET.Element('{http://jabber.org/protocol/muc#user}x')
invite = ET.Element('{http://jabber.org/protocol/muc#user}invite', {'to': jid})
if reason:
@@ -294,7 +294,7 @@ class xep_0045(base.base_plugin):
def getRoomConfig(self, room):
iq = self.xmpp.makeIqGet('http://jabber.org/protocol/muc#owner')
iq['to'] = room
iq['from'] = self.xmpp.jid
iq['from'] = self.xmpp.boundjid.bare
result = iq.send()
if result is None or result['type'] != 'result':
raise ValueError
@@ -316,7 +316,7 @@ class xep_0045(base.base_plugin):
query.append(x)
iq = self.xmpp.makeIqSet(query)
iq['to'] = room
iq['from'] = self.xmpp.jid
iq['from'] = self.xmpp.boundjid.bare
iq.send()
def getJoinedRooms(self):