Add call.is_video flags to td_api.
GitOrigin-RevId: cba87e4aeeb32ac177dd69416592193056c2f8b1
This commit is contained in:
parent
b340b0deaa
commit
95ac56215b
@ -1543,8 +1543,8 @@ messagePoll poll:poll = MessageContent;
|
||||
//@need_shipping_address True, if the shipping address should be specified @receipt_message_id The identifier of the message with the receipt, after the product has been purchased
|
||||
messageInvoice title:string description:string photo:photo currency:string total_amount:int53 start_parameter:string is_test:Bool need_shipping_address:Bool receipt_message_id:int53 = MessageContent;
|
||||
|
||||
//@description A message with information about an ended call @discard_reason Reason why the call was discarded @duration Call duration, in seconds
|
||||
messageCall discard_reason:CallDiscardReason duration:int32 = MessageContent;
|
||||
//@description A message with information about an ended call @is_video True, if the call was a video call @discard_reason Reason why the call was discarded @duration Call duration, in seconds
|
||||
messageCall is_video:Bool discard_reason:CallDiscardReason duration:int32 = MessageContent;
|
||||
|
||||
//@description A newly created basic group @title Title of the basic group @member_user_ids User identifiers of members in the basic group
|
||||
messageBasicGroupChatCreate title:string member_user_ids:vector<int32> = MessageContent;
|
||||
@ -1966,8 +1966,8 @@ callProblemSilentRemote = CallProblem;
|
||||
callProblemDropped = CallProblem;
|
||||
|
||||
|
||||
//@description Describes a call @id Call identifier, not persistent @user_id Peer user identifier @is_outgoing True, if the call is outgoing @state Call state
|
||||
call id:int32 user_id:int32 is_outgoing:Bool state:CallState = Call;
|
||||
//@description Describes a call @id Call identifier, not persistent @user_id Peer user identifier @is_outgoing True, if the call is outgoing @is_video True, if the call is a video call @state Call state
|
||||
call id:int32 user_id:int32 is_outgoing:Bool is_video:Bool state:CallState = Call;
|
||||
|
||||
|
||||
//@description Contains settings for the authentication of the user's phone number
|
||||
@ -4053,14 +4053,14 @@ checkChatInviteLink invite_link:string = ChatInviteLinkInfo;
|
||||
joinChatByInviteLink invite_link:string = Chat;
|
||||
|
||||
|
||||
//@description Creates a new call @user_id Identifier of the user to be called @protocol Description of the call protocols supported by the application
|
||||
createCall user_id:int32 protocol:callProtocol = CallId;
|
||||
//@description Creates a new call @user_id Identifier of the user to be called @protocol Description of the call protocols supported by the application @is_video True, if a video call needs to be created
|
||||
createCall user_id:int32 protocol:callProtocol is_video:Bool = CallId;
|
||||
|
||||
//@description Accepts an incoming call @call_id Call identifier @protocol Description of the call protocols supported by the application
|
||||
acceptCall call_id:int32 protocol:callProtocol = Ok;
|
||||
|
||||
//@description Discards a call @call_id Call identifier @is_disconnected True, if the user was disconnected @duration The call duration, in seconds @connection_id Identifier of the connection used during the call
|
||||
discardCall call_id:int32 is_disconnected:Bool duration:int32 connection_id:int64 = Ok;
|
||||
//@description Discards a call @call_id Call identifier @is_disconnected True, if the user was disconnected @duration The call duration, in seconds @is_video True, if the call was a video call @connection_id Identifier of the connection used during the call
|
||||
discardCall call_id:int32 is_disconnected:Bool duration:int32 is_video:Bool connection_id:int64 = Ok;
|
||||
|
||||
//@description Sends a call rating @call_id Call identifier @rating Call rating; 1-5 @comment An optional user comment if the rating is less than 5 @problems List of the exact types of problems with the call, specified by the user
|
||||
sendCallRating call_id:int32 rating:int32 comment:string problems:vector<CallProblem> = Ok;
|
||||
|
Binary file not shown.
@ -703,7 +703,7 @@ void CallActor::flush_call_state() {
|
||||
send_closure(G()->td(), &Td::send_update,
|
||||
make_tl_object<td_api::updateCall>(
|
||||
make_tl_object<td_api::call>(local_call_id_.get(), is_outgoing_ ? user_id_.get() : call_admin_id_,
|
||||
is_outgoing_, call_state_.get_call_state_object())));
|
||||
is_outgoing_, is_video_, call_state_.get_call_state_object())));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4491,7 +4491,8 @@ tl_object_ptr<td_api::MessageContent> get_message_content_object(const MessageCo
|
||||
}
|
||||
case MessageContentType::Call: {
|
||||
const MessageCall *m = static_cast<const MessageCall *>(content);
|
||||
return make_tl_object<td_api::messageCall>(get_call_discard_reason_object(m->discard_reason), m->duration);
|
||||
return make_tl_object<td_api::messageCall>(m->is_video, get_call_discard_reason_object(m->discard_reason),
|
||||
m->duration);
|
||||
}
|
||||
case MessageContentType::PaymentSuccessful: {
|
||||
const MessagePaymentSuccessful *m = static_cast<const MessagePaymentSuccessful *>(content);
|
||||
|
@ -5838,14 +5838,14 @@ void Td::on_request(uint64 id, td_api::createCall &request) {
|
||||
}
|
||||
|
||||
send_closure(G()->call_manager(), &CallManager::create_call, user_id, std::move(input_user),
|
||||
CallProtocol(*request.protocol_), false, std::move(query_promise));
|
||||
CallProtocol(*request.protocol_), request.is_video_, std::move(query_promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, td_api::discardCall &request) {
|
||||
CHECK_IS_USER();
|
||||
CREATE_OK_REQUEST_PROMISE();
|
||||
send_closure(G()->call_manager(), &CallManager::discard_call, CallId(request.call_id_), request.is_disconnected_,
|
||||
request.duration_, false, request.connection_id_, std::move(promise));
|
||||
request.duration_, request.is_video_, request.connection_id_, std::move(promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, td_api::acceptCall &request) {
|
||||
|
@ -2729,13 +2729,15 @@ class CliClient final : public Actor {
|
||||
send_request(td_api::make_object<td_api::closeSecretChat>(as_secret_chat_id(args)));
|
||||
} else if (op == "cc" || op == "CreateCall") {
|
||||
send_request(td_api::make_object<td_api::createCall>(
|
||||
as_user_id(args), td_api::make_object<td_api::callProtocol>(true, true, 65, 65, vector<string>{"2.6"})));
|
||||
as_user_id(args), td_api::make_object<td_api::callProtocol>(true, true, 65, 65, vector<string>{"2.6"}),
|
||||
Random::fast(0, 1) == 1));
|
||||
} else if (op == "dc" || op == "DiscardCall") {
|
||||
string call_id;
|
||||
string is_disconnected;
|
||||
std::tie(call_id, is_disconnected) = split(args);
|
||||
|
||||
send_request(td_api::make_object<td_api::discardCall>(as_call_id(call_id), as_bool(is_disconnected), 0, 0));
|
||||
send_request(td_api::make_object<td_api::discardCall>(as_call_id(call_id), as_bool(is_disconnected), 0,
|
||||
Random::fast(0, 1) == 1, 0));
|
||||
} else if (op == "ac" || op == "AcceptCall") {
|
||||
send_request(td_api::make_object<td_api::acceptCall>(
|
||||
as_call_id(args), td_api::make_object<td_api::callProtocol>(true, true, 65, 65, vector<string>{"2.6"})));
|
||||
|
Loading…
Reference in New Issue
Block a user