1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-11-05 17:15:04 -05:00

filetransfer

This commit is contained in:
Philipp Hancke 2014-06-13 22:26:02 +02:00
parent d558ce82d5
commit db9e64702a

View File

@ -67,6 +67,30 @@ module.exports = HumanModel.define({
return false;
}
return true;
}
},
supportsJingleFiletransfer: {
deps: ['discoInfo'],
fn: function () {
if (!this.discoInfo) return false;
var features = this.discoInfo.features || [];
if (features.indexOf('urn:xmpp:jingle:1') === -1) {
return false;
}
if (features.indexOf('urn:xmpp:jingle:apps:file-transfer:3') === -1) {
return false;
}
if (features.indexOf('urn:xmpp:jingle:transports:ice-udp:1') === -1) {
return false;
}
if (features.indexOf('urn:xmpp:jingle:transports:dtls-sctp:1') === -1) {
return false;
}
return true;
}
}