diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp index 72e2ddb33b..3db28846d4 100644 --- a/Telegram/SourceFiles/calls/calls_call.cpp +++ b/Telegram/SourceFiles/calls/calls_call.cpp @@ -85,8 +85,9 @@ Call::Call(gsl::not_null delegate, gsl::not_null user, Typ if (_type == Type::Outgoing) { setState(State::Requesting); + } else { + startWaitingTrack(); } - startWaitingTrack(); } void Call::generateModExpFirst(base::const_byte_span randomSeed) { @@ -327,9 +328,10 @@ bool Call::handleUpdate(const MTPPhoneCall &call) { if (data.vid.v != _id) { return false; } - if (_state == State::Waiting && data.vreceive_date.v != 0) { + if (_type == Type::Outgoing && _state == State::Waiting && data.vreceive_date.v != 0) { _discardByTimeoutTimer.callOnce(Global::CallRingTimeoutMs()); setState(State::Ringing); + startWaitingTrack(); } } return true;