summaryrefslogtreecommitdiff
path: root/sleekxmpp/roster/single.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/roster/single.py')
-rw-r--r--sleekxmpp/roster/single.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/sleekxmpp/roster/single.py b/sleekxmpp/roster/single.py
index 903333a3..c2f8e763 100644
--- a/sleekxmpp/roster/single.py
+++ b/sleekxmpp/roster/single.py
@@ -286,5 +286,16 @@ class RosterNode(object):
self.xmpp.event('sent_presence')
self.xmpp.sentpresence = True
+ def send_last_presence(self):
+ if self.last_status is None:
+ self.send_presence()
+ else:
+ pres = self.last_status
+ if self.xmpp.is_component:
+ pres['from'] = self.jid
+ else:
+ del pres['from']
+ pres.send()
+
def __repr__(self):
return repr(self._jids)