Browse Source

Fix issue where incoming chat messages fail when getting called from the same session at the same time (FS#1922).

pull/137/head
Simon Eisenmann 11 years ago
parent
commit
09ed8b1e23
  1. 2
      static/js/directives/chat.js

2
static/js/directives/chat.js

@ -238,7 +238,7 @@ define(['underscore', 'text!partials/chat.html', 'text!partials/chatroom.html'],
subscope.sendChat = function(to, message, status, mid, noloop) { subscope.sendChat = function(to, message, status, mid, noloop) {
//console.log("send chat", to, scope.peer); //console.log("send chat", to, scope.peer);
var peercall = mediaStream.webrtc.findTargetCall(to); var peercall = mediaStream.webrtc.findTargetCall(to);
if (peercall && peercall.peerconnection.datachannelReady) { if (peercall && peercall.peerconnection && peercall.peerconnection.datachannelReady) {
subscope.p2p(true); subscope.p2p(true);
// Send out stuff through data channel. // Send out stuff through data channel.
return subscope.sendChatPeer2Peer(peercall, to, message, status, mid, noloop); return subscope.sendChatPeer2Peer(peercall, to, message, status, mid, noloop);

Loading…
Cancel
Save