remove roster item state responsibility from clients

This commit is contained in:
Nathan Fritz
2011-04-14 16:27:27 -07:00
parent b9bf30e095
commit 46dc6eac88
3 changed files with 41 additions and 28 deletions

View File

@@ -78,6 +78,8 @@ class ComponentXMPP(BaseXMPP):
Callback('Handshake',
MatchXPath('{jabber:component:accept}handshake'),
self._handle_handshake))
self.add_event_handler('presence_probe',
self._handle_probe)
def connect(self):
"""
@@ -139,3 +141,8 @@ class ComponentXMPP(BaseXMPP):
xml -- The reply handshake stanza.
"""
self.event("session_start")
def _handle_probe(self, presence):
pto = presence['to'].bare
pfrom = presence['from'].bare
self.roster[pto][pfrom].handle_probe(presence)