From ce145b04ac21a90e77fccf3239142d8500713b80 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Thu, 16 Jun 2011 16:09:15 -0700 Subject: Integrate roster with ClientXMPP. Roster updates are now passed through to the roster when using self.update_roster, etc. --- sleekxmpp/clientxmpp.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'sleekxmpp/clientxmpp.py') 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): """ -- cgit v1.2.3