Update to XEP-0300 version 0.5 (:2 namespace).

This commit is contained in:
Emmanuel Gil Peyrot 2017-06-14 20:29:52 +01:00
parent 71f0e40c94
commit 8356256f17
4 changed files with 4 additions and 4 deletions

View File

@ -253,7 +253,7 @@ gajim_common_features = [nbxmpp.NS_BYTESTREAM, nbxmpp.NS_SI, nbxmpp.NS_FILE,
nbxmpp.NS_REGISTER, nbxmpp.NS_VERSION, nbxmpp.NS_DATA, nbxmpp.NS_ENCRYPTED,
'msglog', 'sslc2s', 'stringprep', nbxmpp.NS_PING, nbxmpp.NS_TIME_REVISED,
nbxmpp.NS_SSN, nbxmpp.NS_MOOD, nbxmpp.NS_ACTIVITY, nbxmpp.NS_NICK,
nbxmpp.NS_ROSTERX, nbxmpp.NS_SECLABEL, nbxmpp.NS_HASHES,
nbxmpp.NS_ROSTERX, nbxmpp.NS_SECLABEL, nbxmpp.NS_HASHES_2,
nbxmpp.NS_HASHES_MD5, nbxmpp.NS_HASHES_SHA1, nbxmpp.NS_HASHES_SHA256,
nbxmpp.NS_HASHES_SHA512, nbxmpp.NS_CONFERENCE]

View File

@ -172,7 +172,7 @@ class ConnectionJingle(object):
return c.transport.sid
def __hash_support(self, contact):
if contact.supports(nbxmpp.NS_HASHES):
if contact.supports(nbxmpp.NS_HASHES_2):
if contact.supports(nbxmpp.NS_HASHES_BLAKE2B_512):
return 'blake2b-512'
elif contact.supports(nbxmpp.NS_HASHES_BLAKE2B_256):

View File

@ -192,7 +192,7 @@ class JingleContent:
if self.file_props.type_ == 'r':
if self.file_props.hash_:
file_tag.addChild('hash', attrs={'algo': self.file_props.algo},
namespace=nbxmpp.NS_HASHES,
namespace=nbxmpp.NS_HASHES_2,
payload=self.file_props.hash_)
else:
# if the file is less than 10 mb, then it is small

View File

@ -444,7 +444,7 @@ class JingleSession:
for child in payload:
if child.getName() == 'checksum':
hash_ = child.getTag('file').getTag(name='hash',
namespace=nbxmpp.NS_HASHES)
namespace=nbxmpp.NS_HASHES_2)
algo = hash_.getAttr('algo')
if algo in nbxmpp.Hashes.supported:
file_props = FilesProp.getFileProp(self.connection.name,