diff options
author | Lance Stout <lancestout@gmail.com> | 2012-07-24 20:01:18 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-07-24 20:01:18 -0700 |
commit | c42f1ad4c79863261977a9c5ea3b33be0b51b946 (patch) | |
tree | 8eee86ddb082f51dea0866f16146bcd1f4f13c1f /sleekxmpp/clientxmpp.py | |
parent | a3ec1af2053bc0be4864ae290e6e5fc39f3fd5fe (diff) | |
parent | 9d8de7fc15afc39a666d2ac16b62a068dfc55112 (diff) | |
download | slixmpp-c42f1ad4c79863261977a9c5ea3b33be0b51b946.tar.gz slixmpp-c42f1ad4c79863261977a9c5ea3b33be0b51b946.tar.bz2 slixmpp-c42f1ad4c79863261977a9c5ea3b33be0b51b946.tar.xz slixmpp-c42f1ad4c79863261977a9c5ea3b33be0b51b946.zip |
Merge branch 'master' into develop
Diffstat (limited to 'sleekxmpp/clientxmpp.py')
-rw-r--r-- | sleekxmpp/clientxmpp.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py index 48637dad..e3b434e9 100644 --- a/sleekxmpp/clientxmpp.py +++ b/sleekxmpp/clientxmpp.py @@ -179,8 +179,7 @@ class ClientXMPP(BaseXMPP): self._stream_feature_order.remove((order, name)) self._stream_feature_order.sort() - def update_roster(self, jid, name=None, subscription=None, groups=[], - block=True, timeout=None, callback=None): + def update_roster(self, jid, **kwargs): """Add or change a roster item. :param jid: The JID of the entry to modify. @@ -201,6 +200,16 @@ class ClientXMPP(BaseXMPP): Will be executed when the roster is received. Implies ``block=False``. """ + current = self.client_roster[jid] + + name = kwargs.get('name', current['name']) + subscription = kwargs.get('subscription', current['subscription']) + groups = kwargs.get('groups', current['groups']) + + block = kwargs.get('block', True) + timeout = kwargs.get('timeout', None) + callback = kwargs.get('callback', None) + return self.client_roster.update(jid, name, subscription, groups, block, timeout, callback) |