core (xmpp): added missing disco#info namespace to disco info result.

This commit is contained in:
Goffi 2018-11-10 10:16:38 +01:00
commit d590de6373
2 changed files with 17 additions and 3 deletions

View file

@ -63,10 +63,12 @@ class SAT(service.Service):
self.initialised = defer.Deferred()
self.profiles = {}
self.plugins = {}
# map for short name to whole namespace,
self.ns_map = {
u"x-data": u"jabber:x:data"
} #  map for short name to whole namespace,
#  extended by plugins with registerNamespace
u"x-data": xmpp.NS_X_DATA,
u"disco#info": xmpp.NS_DISCO_INFO,
}
# extended by plugins with registerNamespace
self.memory = memory.Memory(self)
self.trigger = (
trigger.TriggerManager()

View file

@ -43,6 +43,10 @@ import uuid
import sys
NS_X_DATA = u"jabber:x:data"
NS_DISCO_INFO = u"http://jabber.org/protocol/disco#info"
class SatXMPPEntity(object):
"""Common code for Client and Component"""
_reason = None # reason of disconnection
@ -1351,9 +1355,17 @@ class SatPresenceProtocol(xmppim.PresenceClientProtocol):
class SatDiscoProtocol(disco.DiscoClientProtocol):
implements(iwokkel.IDisco)
def __init__(self, host):
disco.DiscoClientProtocol.__init__(self)
def getDiscoInfo(self, requestor, target, nodeIdentifier=""):
return [disco.DiscoFeature(NS_DISCO_INFO)]
def getDiscoItems(self, requestor, target, nodeIdentifier=""):
return []
class SatFallbackHandler(generic.FallbackHandler):
def __init__(self, host):