update_caps() can now do presence broadcasting.
As part of adding this feature:
- fixed bug in update_caps() not assigning verstrings
- fixed xep_0004 typo
- can now use None as a roster key which will map to boundjid.bare
- fixed using JID objects in disco node handlers
- fixed failing test related to get_roster
Several of these bugs I've fixed before, so I either didn't push them
earlier, or I clobbered something when merging. *shrug*
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user