mirror of
https://github.com/danog/php-libtgvoip.git
synced 2024-11-30 04:19:26 +01:00
Just in case
This commit is contained in:
parent
589e518d2f
commit
2cc8fcc1e2
30
main.cpp
30
main.cpp
@ -94,21 +94,23 @@ void VoIP::deinitVoIPController() {
|
||||
void VoIP::discard(Php::Parameters ¶ms)
|
||||
{
|
||||
Php::Value self(this);
|
||||
Php::Array reason;
|
||||
Php::Array rating;
|
||||
Php::Value debug;
|
||||
if (params.size() > 0) {
|
||||
reason = params[0];
|
||||
} else {
|
||||
reason["_"] = "phoneCallDiscardReasonDisconnect";
|
||||
if (self["internalStorage"]["madeline"].value().instanceOf("danog\\MadelineProto\\MTProto")) {
|
||||
Php::Array reason;
|
||||
Php::Array rating;
|
||||
Php::Value debug;
|
||||
if (params.size() > 0) {
|
||||
reason = params[0];
|
||||
} else {
|
||||
reason["_"] = "phoneCallDiscardReasonDisconnect";
|
||||
}
|
||||
if (params.size() > 1) {
|
||||
rating = params[1];
|
||||
}
|
||||
if (params.size() > 2) {
|
||||
debug = params[2];
|
||||
} else debug = true;
|
||||
self["internalStorage"]["madeline"].value().call("discard_call", self["internalStorage"]["callID"]["id"].value(), reason, rating, debug);
|
||||
}
|
||||
if (params.size() > 1) {
|
||||
rating = params[1];
|
||||
}
|
||||
if (params.size() > 2) {
|
||||
debug = params[2];
|
||||
} else debug = true;
|
||||
self["internalStorage"]["madeline"].value().call("discard_call", self["internalStorage"]["callID"]["id"].value(), reason, rating, debug);
|
||||
deinitVoIPController();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user