From adf6d49fd14c830c443abda1ef53a84be452a868 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sat, 18 Jun 2011 14:36:19 -0700 Subject: [PATCH] Store unavailable presence as last sent presence. --- sleekxmpp/roster/item.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sleekxmpp/roster/item.py b/sleekxmpp/roster/item.py index 72baf694..9980b3b4 100644 --- a/sleekxmpp/roster/item.py +++ b/sleekxmpp/roster/item.py @@ -312,7 +312,8 @@ class RosterItem(object): pto=self.jid) if self.xmpp.is_component: p['from'] = self.owner - if p['type'] in p.showtypes or p['type'] == 'available': + if p['type'] in p.showtypes or \ + p['type'] in ['available', 'unavailable']: self.last_status = p p.send()