diff options
author | Lance Stout <lancestout@gmail.com> | 2012-06-18 17:28:58 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-06-18 22:15:21 -0700 |
commit | ff6fc44215c07ef112c59dec32ed753cd30a460c (patch) | |
tree | 97415e775e717bc88933c8c6ee842d8b2c336c9d /sleekxmpp/basexmpp.py | |
parent | 62391a895ad90ef3cab399efebaac5da9700d79e (diff) | |
download | slixmpp-ff6fc44215c07ef112c59dec32ed753cd30a460c.tar.gz slixmpp-ff6fc44215c07ef112c59dec32ed753cd30a460c.tar.bz2 slixmpp-ff6fc44215c07ef112c59dec32ed753cd30a460c.tar.xz slixmpp-ff6fc44215c07ef112c59dec32ed753cd30a460c.zip |
Simplify tracking last sent presence using outgoing filters.
Diffstat (limited to 'sleekxmpp/basexmpp.py')
-rw-r--r-- | sleekxmpp/basexmpp.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py index 4f48f809..099b6dd0 100644 --- a/sleekxmpp/basexmpp.py +++ b/sleekxmpp/basexmpp.py @@ -536,18 +536,8 @@ class BaseXMPP(XMLStream): :param pfrom: The sender of the presence. :param pnick: Optional nickname of the presence's sender. """ - # Python2.6 chokes on Unicode strings for dict keys. - args = {str('pto'): pto, - str('ptype'): ptype, - str('pshow'): pshow, - str('pstatus'): pstatus, - str('ppriority'): ppriority, - str('pnick'): pnick} - - if self.is_component: - self.roster[pfrom].send_presence(**args) - else: - self.client_roster.send_presence(**args) + self.make_presence(pshow, pstatus, ppriority, pto, + ptype, pfrom, pnick).send() def send_presence_subscription(self, pto, pfrom=None, ptype='subscribe', pnick=None): |