mirror of https://github.com/vector-im/riot-web
Wrap cases in {}
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
023d874949
commit
74e1342fa8
|
@ -481,6 +481,8 @@ export default class CallHandler extends EventEmitter {
|
||||||
this.silencedCalls.delete(call.callId);
|
this.silencedCalls.delete(call.callId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (newState) {
|
||||||
|
case CallState.Ringing: {
|
||||||
const incomingCallPushRule = (
|
const incomingCallPushRule = (
|
||||||
new PushProcessor(MatrixClientPeg.get()).getPushRuleById(RuleId.IncomingCall) as IPushRule
|
new PushProcessor(MatrixClientPeg.get()).getPushRuleById(RuleId.IncomingCall) as IPushRule
|
||||||
);
|
);
|
||||||
|
@ -489,19 +491,19 @@ export default class CallHandler extends EventEmitter {
|
||||||
action.set_tweak === TweakName.Sound &&
|
action.set_tweak === TweakName.Sound &&
|
||||||
action.value === "ring"
|
action.value === "ring"
|
||||||
));
|
));
|
||||||
switch (newState) {
|
|
||||||
case CallState.Ringing:
|
|
||||||
if (pushRuleEnabled && tweakSetToRing) {
|
if (pushRuleEnabled && tweakSetToRing) {
|
||||||
this.play(AudioID.Ring);
|
this.play(AudioID.Ring);
|
||||||
} else {
|
} else {
|
||||||
this.silenceCall(call.callId);
|
this.silenceCall(call.callId);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CallState.InviteSent:
|
}
|
||||||
|
case CallState.InviteSent: {
|
||||||
this.play(AudioID.Ringback);
|
this.play(AudioID.Ringback);
|
||||||
break;
|
break;
|
||||||
case CallState.Ended:
|
}
|
||||||
{
|
case CallState.Ended: {
|
||||||
const hangupReason = call.hangupReason;
|
const hangupReason = call.hangupReason;
|
||||||
Analytics.trackEvent('voip', 'callEnded', 'hangupReason', hangupReason);
|
Analytics.trackEvent('voip', 'callEnded', 'hangupReason', hangupReason);
|
||||||
this.removeCallForRoom(mappedRoomId);
|
this.removeCallForRoom(mappedRoomId);
|
||||||
|
|
Loading…
Reference in New Issue