summaryrefslogtreecommitdiff
path: root/sleekxmpp/clientxmpp.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-06-16 16:09:15 -0700
committerLance Stout <lancestout@gmail.com>2011-06-16 16:09:15 -0700
commitce145b04ac21a90e77fccf3239142d8500713b80 (patch)
tree76b907ba8f308fd0d627d59e8ce8834f11ce6d41 /sleekxmpp/clientxmpp.py
parent29d775e6756e7d8028438942ca2d34d1c39c559f (diff)
downloadslixmpp-ce145b04ac21a90e77fccf3239142d8500713b80.tar.gz
slixmpp-ce145b04ac21a90e77fccf3239142d8500713b80.tar.bz2
slixmpp-ce145b04ac21a90e77fccf3239142d8500713b80.tar.xz
slixmpp-ce145b04ac21a90e77fccf3239142d8500713b80.zip
Integrate roster with ClientXMPP.
Roster updates are now passed through to the roster when using self.update_roster, etc.
Diffstat (limited to 'sleekxmpp/clientxmpp.py')
-rw-r--r--sleekxmpp/clientxmpp.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py
index a7b24351..02d47648 100644
--- a/sleekxmpp/clientxmpp.py
+++ b/sleekxmpp/clientxmpp.py
@@ -225,15 +225,8 @@ class ClientXMPP(BaseXMPP):
Will be executed when the roster is received.
Implies block=False.
"""
- iq = self.Iq()
- iq['type'] = 'set'
- iq['roster']['items'] = {jid: {'name': name,
- 'subscription': subscription,
- 'groups': groups}}
- response = iq.send(block, timeout, callback)
- if response in [False, None] or not isinstance(response, Iq):
- return response
- return response['type'] == 'result'
+ return self.client_roster.updtae(jid, name, subscription, groups,
+ block, timeout, callback)
def del_roster_item(self, jid):
"""
@@ -243,7 +236,7 @@ class ClientXMPP(BaseXMPP):
Arguments:
jid -- The JID of the item to remove.
"""
- return self.update_roster(jid, subscription='remove')
+ return self.client_roster.remove(jid)
def get_roster(self, block=True, timeout=None, callback=None):
"""