mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +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:
@@ -231,7 +231,7 @@ void Call::hangup() {
|
|||||||
_delegate->callFinished(this);
|
_delegate->callFinished(this);
|
||||||
} else {
|
} else {
|
||||||
auto missed = (_state == State::Ringing || (_state == State::Waiting && _type == Type::Outgoing));
|
auto missed = (_state == State::Ringing || (_state == State::Waiting && _type == Type::Outgoing));
|
||||||
auto declined = (_state == State::WaitingIncoming);
|
auto declined = isIncomingWaiting();
|
||||||
auto reason = missed ? MTP_phoneCallDiscardReasonMissed() :
|
auto reason = missed ? MTP_phoneCallDiscardReasonMissed() :
|
||||||
declined ? MTP_phoneCallDiscardReasonBusy() : MTP_phoneCallDiscardReasonHangup();
|
declined ? MTP_phoneCallDiscardReasonBusy() : MTP_phoneCallDiscardReasonHangup();
|
||||||
finish(FinishType::Ended, reason);
|
finish(FinishType::Ended, reason);
|
||||||
|
Reference in New Issue
Block a user