From ff6fc44215c07ef112c59dec32ed753cd30a460c Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Mon, 18 Jun 2012 17:28:58 -0700 Subject: Simplify tracking last sent presence using outgoing filters. --- sleekxmpp/basexmpp.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'sleekxmpp/basexmpp.py') 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): -- cgit v1.2.3