lalala
This commit is contained in:
parent
a59bcf7b26
commit
ed099be65c
@ -490,7 +490,8 @@ trait UpdateHandler
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'phoneCallDiscarded':
|
case 'phoneCallDiscarded':
|
||||||
$this->discard_call($update['phone_call']['id'], ['_' => 'phoneCallDiscardReasonHangup'], [], $update['phone_call']['need_debug']);
|
if (!isset($this->calls[$update['phone_call']['id']])) return;
|
||||||
|
($update['phone_call'] = $this->calls[$update['phone_call']['id']])->discard(['_' => 'phoneCallDiscardReasonHangup'], [], $update['phone_call']['need_debug']);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,11 @@ trait AuthKeyHandler
|
|||||||
$controller->discard();
|
$controller->discard();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if ($this->call_status($params['id']) !== \danog\MadelineProto\VoIP::CALL_STATE_INCOMING) {
|
||||||
|
throw new \danog\MadelineProto\Exception('I cannot accept call '.$params['id']);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
\danog\MadelineProto\Logger::log(['Accepting call from '.$this->calls[$params['id']]->getOtherID().'...'], \danog\MadelineProto\Logger::VERBOSE);
|
\danog\MadelineProto\Logger::log(['Accepting call from '.$this->calls[$params['id']]->getOtherID().'...'], \danog\MadelineProto\Logger::VERBOSE);
|
||||||
|
|
||||||
$dh_config = $this->get_dh_config();
|
$dh_config = $this->get_dh_config();
|
||||||
@ -96,7 +101,6 @@ trait AuthKeyHandler
|
|||||||
});
|
});
|
||||||
if ($this->call_status($params['id']) !== \danog\MadelineProto\VoIP::CALL_STATE_REQUESTED) {
|
if ($this->call_status($params['id']) !== \danog\MadelineProto\VoIP::CALL_STATE_REQUESTED) {
|
||||||
\danog\MadelineProto\Logger::log(['Could not find and confirm call '.$params['id']]);
|
\danog\MadelineProto\Logger::log(['Could not find and confirm call '.$params['id']]);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
\danog\MadelineProto\Logger::log(['Confirming call from '.$this->calls[$params['id']]->getOtherID().'...'], \danog\MadelineProto\Logger::VERBOSE);
|
\danog\MadelineProto\Logger::log(['Confirming call from '.$this->calls[$params['id']]->getOtherID().'...'], \danog\MadelineProto\Logger::VERBOSE);
|
||||||
@ -223,7 +227,7 @@ trait AuthKeyHandler
|
|||||||
return $this->calls[$id]->getCallState();
|
return $this->calls[$id]->getCallState();
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return \danog\MadelineProto\VoIP::CALL_STATE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_call($call)
|
public function get_call($call)
|
||||||
|
Loading…
Reference in New Issue
Block a user