Selects the datachannel that is ready for sending notifications to the bridge.
This commit is contained in:
parent
ca3c59f244
commit
e74d27bf88
20
app.js
20
app.js
|
@ -1507,12 +1507,20 @@ $(document).bind('fatalError.jingle',
|
||||||
function onSelectedEndpointChanged(userJid)
|
function onSelectedEndpointChanged(userJid)
|
||||||
{
|
{
|
||||||
console.log('selected endpoint changed: ', userJid);
|
console.log('selected endpoint changed: ', userJid);
|
||||||
if (_dataChannels && _dataChannels.length != 0 && _dataChannels[0].readyState == "open") {
|
if (_dataChannels && _dataChannels.length != 0)
|
||||||
_dataChannels[0].send(JSON.stringify({
|
{
|
||||||
'colibriClass': 'SelectedEndpointChangedEvent',
|
_dataChannels.some(function (dataChannel) {
|
||||||
'selectedEndpoint': (!userJid || userJid == null)
|
if (dataChannel.readyState == 'open')
|
||||||
? null : Strophe.getResourceFromJid(userJid)
|
{
|
||||||
}));
|
dataChannel.send(JSON.stringify({
|
||||||
|
'colibriClass': 'SelectedEndpointChangedEvent',
|
||||||
|
'selectedEndpoint': (!userJid || userJid == null)
|
||||||
|
? null : Strophe.getResourceFromJid(userJid)
|
||||||
|
}));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue