Don't die on malformed VoIP offers

healthdemo
David Baker 2015-08-07 14:48:50 +01:00
parent 711bf583ab
commit 64727cb60e
1 changed files with 1 additions and 1 deletions

View File

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