tidy up event handler
parent
d1070c05dd
commit
dfabe79335
|
@ -1373,17 +1373,19 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
ready: true,
|
||||
});
|
||||
});
|
||||
cli.on('Call.incoming', function(call) {
|
||||
// Check if the VoIP UI has been disabled
|
||||
if (!SettingsStore.getValue(UIFeature.Voip)) return;
|
||||
// we dispatch this synchronously to make sure that the event
|
||||
// handlers on the call are set up immediately (so that if
|
||||
// we get an immediate hangup, we don't get a stuck call)
|
||||
dis.dispatch({
|
||||
action: 'incoming_call',
|
||||
call: call,
|
||||
}, true);
|
||||
});
|
||||
|
||||
if (SettingsStore.getValue(UIFeature.Voip)) {
|
||||
cli.on('Call.incoming', function(call) {
|
||||
// we dispatch this synchronously to make sure that the event
|
||||
// handlers on the call are set up immediately (so that if
|
||||
// we get an immediate hangup, we don't get a stuck call)
|
||||
dis.dispatch({
|
||||
action: 'incoming_call',
|
||||
call: call,
|
||||
}, true);
|
||||
});
|
||||
}
|
||||
|
||||
cli.on('Session.logged_out', function(errObj) {
|
||||
if (Lifecycle.isLoggingOut()) return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue