summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/plugins')
-rw-r--r--sleekxmpp/plugins/xep_0045.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/sleekxmpp/plugins/xep_0045.py b/sleekxmpp/plugins/xep_0045.py
index d5fbf003..feec70db 100644
--- a/sleekxmpp/plugins/xep_0045.py
+++ b/sleekxmpp/plugins/xep_0045.py
@@ -276,10 +276,10 @@ class xep_0045(base.base_plugin):
raise ValueError
return True
- def invite(self, room, jid, reason=''):
+ def invite(self, room, jid, reason='', mfrom=''):
""" Invite a jid to a room."""
msg = self.xmpp.makeMessage(room)
- msg['from'] = self.xmpp.boundjid.bare
+ msg['from'] = mfrom
x = ET.Element('{http://jabber.org/protocol/muc#user}x')
invite = ET.Element('{http://jabber.org/protocol/muc#user}invite', {'to': jid})
if reason:
@@ -299,10 +299,10 @@ class xep_0045(base.base_plugin):
self.xmpp.sendPresence(pshow='unavailable', pto="%s/%s" % (room, nick))
del self.rooms[room]
- def getRoomConfig(self, room):
+ def getRoomConfig(self, room, ifrom=''):
iq = self.xmpp.makeIqGet('http://jabber.org/protocol/muc#owner')
iq['to'] = room
- iq['from'] = self.xmpp.boundjid.bare
+ iq['from'] = ifrom
result = iq.send()
if result is None or result['type'] != 'result':
raise ValueError
@@ -318,13 +318,13 @@ class xep_0045(base.base_plugin):
iq = self.xmpp.makeIqSet(query)
iq.send()
- def setRoomConfig(self, room, config):
+ def setRoomConfig(self, room, config, ifrom=''):
query = ET.Element('{http://jabber.org/protocol/muc#owner}query')
x = config.getXML('submit')
query.append(x)
iq = self.xmpp.makeIqSet(query)
iq['to'] = room
- iq['from'] = self.xmpp.boundjid.bare
+ iq['from'] = ifrom
iq.send()
def getJoinedRooms(self):