Skip to content
Snippets Groups Projects
Commit 8356256f authored by Emmanuel Gil Peyrot's avatar Emmanuel Gil Peyrot
Browse files

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

parent 71f0e40c
No related branches found
No related tags found
No related merge requests found
......@@ -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]
......
......@@ -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):
......
......@@ -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
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment