comparison sat/core/xmpp.py @ 2688:943e78e18882

core (xmpp): added missing disco#info namespace to disco info result.
author Goffi <goffi@goffi.org>
date Sat, 10 Nov 2018 10:16:38 +0100
parents e9cd473a2f46
children 1ecceac3df96
comparison
equal deleted inserted replaced
2687:e9cd473a2f46 2688:943e78e18882
39 from zope.interface import implements 39 from zope.interface import implements
40 import time 40 import time
41 import calendar 41 import calendar
42 import uuid 42 import uuid
43 import sys 43 import sys
44
45
46 NS_X_DATA = u"jabber:x:data"
47 NS_DISCO_INFO = u"http://jabber.org/protocol/disco#info"
44 48
45 49
46 class SatXMPPEntity(object): 50 class SatXMPPEntity(object):
47 """Common code for Client and Component""" 51 """Common code for Client and Component"""
48 _reason = None # reason of disconnection 52 _reason = None # reason of disconnection
1349 self.host.delContact(entity, self.parent.profile) 1353 self.host.delContact(entity, self.parent.profile)
1350 self.host.bridge.subscribe("unsubscribe", entity.userhost(), self.parent.profile) 1354 self.host.bridge.subscribe("unsubscribe", entity.userhost(), self.parent.profile)
1351 1355
1352 1356
1353 class SatDiscoProtocol(disco.DiscoClientProtocol): 1357 class SatDiscoProtocol(disco.DiscoClientProtocol):
1358 implements(iwokkel.IDisco)
1359
1354 def __init__(self, host): 1360 def __init__(self, host):
1355 disco.DiscoClientProtocol.__init__(self) 1361 disco.DiscoClientProtocol.__init__(self)
1362
1363 def getDiscoInfo(self, requestor, target, nodeIdentifier=""):
1364 return [disco.DiscoFeature(NS_DISCO_INFO)]
1365
1366 def getDiscoItems(self, requestor, target, nodeIdentifier=""):
1367 return []
1356 1368
1357 1369
1358 class SatFallbackHandler(generic.FallbackHandler): 1370 class SatFallbackHandler(generic.FallbackHandler):
1359 def __init__(self, host): 1371 def __init__(self, host):
1360 generic.FallbackHandler.__init__(self) 1372 generic.FallbackHandler.__init__(self)