advertise xep-0116 support via disco
This commit is contained in:
parent
88e49ffa46
commit
eb93f9a172
3 changed files with 6 additions and 3 deletions
|
@ -733,6 +733,7 @@ class ConnectionDisco:
|
||||||
q.addChild('feature', attrs = {'var': common.xmpp.NS_MUC})
|
q.addChild('feature', attrs = {'var': common.xmpp.NS_MUC})
|
||||||
q.addChild('feature', attrs = {'var': common.xmpp.NS_COMMANDS})
|
q.addChild('feature', attrs = {'var': common.xmpp.NS_COMMANDS})
|
||||||
q.addChild('feature', attrs = {'var': common.xmpp.NS_DISCO_INFO})
|
q.addChild('feature', attrs = {'var': common.xmpp.NS_DISCO_INFO})
|
||||||
|
q.addChild('feature', attrs = {'var': common.xmpp.NS_ESESSION_INIT})
|
||||||
|
|
||||||
if (node is None or extension == 'cstates') and gajim.config.get('outgoing_chat_state_notifactions') != 'disabled':
|
if (node is None or extension == 'cstates') and gajim.config.get('outgoing_chat_state_notifactions') != 'disabled':
|
||||||
q.addChild('feature', attrs = {'var': common.xmpp.NS_CHATSTATES})
|
q.addChild('feature', attrs = {'var': common.xmpp.NS_CHATSTATES})
|
||||||
|
@ -1220,7 +1221,7 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
||||||
|
|
||||||
def _InitE2ECB(self, con, stanza, session):
|
def _InitE2ECB(self, con, stanza, session):
|
||||||
gajim.log.debug('InitE2ECB')
|
gajim.log.debug('InitE2ECB')
|
||||||
init = stanza.getTag(name='init', namespace='http://www.xmpp.org/extensions/xep-0116.html#ns-init')
|
init = stanza.getTag(name='init', namespace=common.xmpp.NS_ESESSION_INIT)
|
||||||
form = common.xmpp.DataForm(node=init.getTag('x'))
|
form = common.xmpp.DataForm(node=init.getTag('x'))
|
||||||
|
|
||||||
self.dispatch('SESSION_NEG', (stanza.getFrom(), session, form))
|
self.dispatch('SESSION_NEG', (stanza.getFrom(), session, form))
|
||||||
|
@ -1448,7 +1449,8 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
||||||
common.xmpp.NS_FEATURE:
|
common.xmpp.NS_FEATURE:
|
||||||
self._FeatureNegCB(con, msg, session)
|
self._FeatureNegCB(con, msg, session)
|
||||||
return
|
return
|
||||||
if msg.getTag('init') and msg.getTag('init').namespace == 'http://www.xmpp.org/extensions/xep-0116.html#ns-init':
|
if msg.getTag('init') and msg.getTag('init').namespace == \
|
||||||
|
common.xmpp.NS_ESESSION_INIT:
|
||||||
self._InitE2ECB(con, msg, session)
|
self._InitE2ECB(con, msg, session)
|
||||||
|
|
||||||
encrypted = False
|
encrypted = False
|
||||||
|
|
|
@ -730,7 +730,7 @@ class EncryptedStanzaSession(StanzaSession):
|
||||||
response = xmpp.Message()
|
response = xmpp.Message()
|
||||||
|
|
||||||
init = response.NT.init
|
init = response.NT.init
|
||||||
init.setNamespace('http://www.xmpp.org/extensions/xep-0116.html#ns-init')
|
init.setNamespace(xmpp.NS_ESESSION_INIT)
|
||||||
|
|
||||||
x = xmpp.DataForm(typ='result')
|
x = xmpp.DataForm(typ='result')
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ NS_DISCO ='http://jabber.org/protocol/disco'
|
||||||
NS_DISCO_INFO =NS_DISCO+'#info'
|
NS_DISCO_INFO =NS_DISCO+'#info'
|
||||||
NS_DISCO_ITEMS =NS_DISCO+'#items'
|
NS_DISCO_ITEMS =NS_DISCO+'#items'
|
||||||
NS_ENCRYPTED ='jabber:x:encrypted' # JEP-0027
|
NS_ENCRYPTED ='jabber:x:encrypted' # JEP-0027
|
||||||
|
NS_ESESSION_INIT='http://www.xmpp.org/extensions/xep-0116.html#ns-init'
|
||||||
NS_EVENT ='jabber:x:event' # JEP-0022
|
NS_EVENT ='jabber:x:event' # JEP-0022
|
||||||
NS_FEATURE ='http://jabber.org/protocol/feature-neg'
|
NS_FEATURE ='http://jabber.org/protocol/feature-neg'
|
||||||
NS_FILE ='http://jabber.org/protocol/si/profile/file-transfer' # JEP-0096
|
NS_FILE ='http://jabber.org/protocol/si/profile/file-transfer' # JEP-0096
|
||||||
|
|
Loading…
Add table
Reference in a new issue