mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-25 04:38:23 +00:00
Fix phone call decline reason.
If the call was declined fast enough the reason was hangup while it should be busy.
This commit is contained in:
parent
80273c57d0
commit
2de96682db
@ -231,7 +231,7 @@ void Call::hangup() {
|
||||
_delegate->callFinished(this);
|
||||
} else {
|
||||
auto missed = (_state == State::Ringing || (_state == State::Waiting && _type == Type::Outgoing));
|
||||
auto declined = (_state == State::WaitingIncoming);
|
||||
auto declined = isIncomingWaiting();
|
||||
auto reason = missed ? MTP_phoneCallDiscardReasonMissed() :
|
||||
declined ? MTP_phoneCallDiscardReasonBusy() : MTP_phoneCallDiscardReasonHangup();
|
||||
finish(FinishType::Ended, reason);
|
||||
|
Loading…
Reference in New Issue
Block a user