Don't die on malformed VoIP offers

This commit is contained in:
David Baker 2015-08-07 14:48:50 +01:00
parent 711bf583ab
commit 64727cb60e

View file

@ -30,7 +30,7 @@ module.exports = React.createClass({
var senderName = event.sender ? event.sender.name : "Someone"; var senderName = event.sender ? event.sender.name : "Someone";
// FIXME: Find a better way to determine this from the event? // FIXME: Find a better way to determine this from the event?
var type = "voice"; var type = "voice";
if (event.getContent().offer && if (event.getContent().offer && event.getContent().offer.sdp &&
event.getContent().offer.sdp.indexOf('m=video') !== -1) { event.getContent().offer.sdp.indexOf('m=video') !== -1) {
type = "video"; type = "video";
} }