diff options
Diffstat (limited to 'sleekxmpp/clientxmpp.py')
-rw-r--r-- | sleekxmpp/clientxmpp.py | 13 |
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): """ |