Add callStateReady.custom_parameters.
This commit is contained in:
parent
25574476a3
commit
844d7a505a
@ -4074,7 +4074,8 @@ callStateExchangingKeys = CallState;
|
||||
//@encryption_key Call encryption key
|
||||
//@emojis Encryption key emojis fingerprint
|
||||
//@allow_p2p True, if peer-to-peer connection is allowed by users privacy settings
|
||||
callStateReady protocol:callProtocol servers:vector<callServer> config:string encryption_key:bytes emojis:vector<string> allow_p2p:Bool = CallState;
|
||||
//@custom_parameters Custom JSON-encoded call parameters to be passed to tgcalls
|
||||
callStateReady protocol:callProtocol servers:vector<callServer> config:string encryption_key:bytes emojis:vector<string> allow_p2p:Bool custom_parameters:string = CallState;
|
||||
|
||||
//@description The call is hanging up after discardCall has been called
|
||||
callStateHangingUp = CallState;
|
||||
|
@ -124,7 +124,8 @@ tl_object_ptr<td_api::CallState> CallState::get_call_state_object() const {
|
||||
case Type::Ready: {
|
||||
auto call_connections = transform(connections, [](auto &c) { return c.get_call_server_object(); });
|
||||
return make_tl_object<td_api::callStateReady>(protocol.get_call_protocol_object(), std::move(call_connections),
|
||||
config, key, vector<string>(emojis_fingerprint), allow_p2p);
|
||||
config, key, vector<string>(emojis_fingerprint), allow_p2p,
|
||||
custom_parameters);
|
||||
}
|
||||
case Type::HangingUp:
|
||||
return make_tl_object<td_api::callStateHangingUp>();
|
||||
@ -634,6 +635,9 @@ Status CallActor::do_update_call(const telegram_api::phoneCall &call) {
|
||||
}
|
||||
call_state_.protocol = CallProtocol(*call.protocol_);
|
||||
call_state_.allow_p2p = call.p2p_allowed_;
|
||||
if (call.custom_parameters_ != nullptr) {
|
||||
call_state_.custom_parameters = std::move(call.custom_parameters_->data_);
|
||||
}
|
||||
call_state_.type = CallState::Type::Ready;
|
||||
call_state_need_flush_ = true;
|
||||
|
||||
|
@ -85,6 +85,7 @@ struct CallState {
|
||||
string key;
|
||||
string config;
|
||||
vector<string> emojis_fingerprint;
|
||||
string custom_parameters;
|
||||
bool allow_p2p{false};
|
||||
|
||||
Status error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user