correctly send hash in session-accept
This commit is contained in:
parent
eefa1432ff
commit
a71f6701c2
|
@ -180,9 +180,12 @@ class JingleContent(object):
|
||||||
node = xmpp.simplexml.Node(tag='size')
|
node = xmpp.simplexml.Node(tag='size')
|
||||||
node.addData(self.file_props.size)
|
node.addData(self.file_props.size)
|
||||||
file_tag.addChild(node=node)
|
file_tag.addChild(node=node)
|
||||||
|
if self.file_props.type_ == 'r':
|
||||||
if self.file_props.hash_:
|
if self.file_props.hash_:
|
||||||
# TODO: use xep-300 for this bit
|
h = file_tag.addChild('hash', attrs={
|
||||||
pass
|
'algo': self.file_props.algo}, namespace=xmpp.NS_HASHES,
|
||||||
|
payload=self.file_props.hash_)
|
||||||
|
else:
|
||||||
# if the file is less than 10 mb, then it is small
|
# if the file is less than 10 mb, then it is small
|
||||||
# lets calculate it right away
|
# lets calculate it right away
|
||||||
if int(self.file_props.size) < 10000000:
|
if int(self.file_props.size) < 10000000:
|
||||||
|
|
Loading…
Reference in New Issue