Rename createVoiceChat method.

This commit is contained in:
levlam 2020-12-03 01:08:20 +03:00
parent 1da1a14255
commit eeee625803
9 changed files with 12 additions and 12 deletions

View File

@ -4327,8 +4327,8 @@ sendCallRating call_id:int32 rating:int32 comment:string problems:vector<CallPro
sendCallDebugInformation call_id:int32 debug_information:string = Ok;
//@description Creates a group call in a chat. Available only for supergroups; requires can_manage_calls rights @chat_id Chat identifier
createChatGroupCall chat_id:int53 = GroupCallId;
//@description Creates a voice chat (a group call bound to a chat). Available only for supergroups; requires can_manage_calls rights @chat_id Chat identifier
createVoiceChat chat_id:int53 = GroupCallId;
//@description Joins a group call @group_call_id Group call identifier @payload Group join payload, received from tgcalls @source Caller source identifier, received from tgcalls @is_muted True, if the user's microphone is muted
joinGroupCall group_call_id:string payload:groupCallPayload source:int32 is_muted:Bool = GroupCallJoinResponse;

Binary file not shown.

View File

@ -5914,7 +5914,7 @@ void ContactsManager::set_channel_slow_mode_delay(DialogId dialog_id, int32 slow
td_->create_handler<ToggleSlowModeQuery>(std::move(promise))->send(channel_id, slow_mode_delay);
}
void ContactsManager::create_channel_group_call(DialogId dialog_id, Promise<InputGroupCallId> &&promise) {
void ContactsManager::create_channel_voice_chat(DialogId dialog_id, Promise<InputGroupCallId> &&promise) {
if (!dialog_id.is_valid()) {
return promise.set_error(Status::Error(400, "Invalid chat identifier specified"));
}
@ -5947,7 +5947,7 @@ void ContactsManager::create_channel_group_call(DialogId dialog_id, Promise<Inpu
std::move(promise));
}
});
send_closure(G()->group_call_manager(), &GroupCallManager::create_group_call, channel_id, std::move(new_promise));
send_closure(G()->group_call_manager(), &GroupCallManager::create_voice_chat, channel_id, std::move(new_promise));
}
void ContactsManager::on_create_channel_group_call(ChannelId channel_id, InputGroupCallId group_call_id,

View File

@ -365,7 +365,7 @@ class ContactsManager : public Actor {
void set_channel_slow_mode_delay(DialogId dialog_id, int32 slow_mode_delay, Promise<Unit> &&promise);
void create_channel_group_call(DialogId dialog_id, Promise<InputGroupCallId> &&promise);
void create_channel_voice_chat(DialogId dialog_id, Promise<InputGroupCallId> &&promise);
void report_channel_spam(ChannelId channel_id, UserId user_id, const vector<MessageId> &message_ids,
Promise<Unit> &&promise);

View File

@ -323,7 +323,7 @@ void GroupCallManager::tear_down() {
parent_.reset();
}
void GroupCallManager::create_group_call(ChannelId channel_id, Promise<InputGroupCallId> &&promise) {
void GroupCallManager::create_voice_chat(ChannelId channel_id, Promise<InputGroupCallId> &&promise) {
td_->create_handler<CreateGroupCallQuery>(std::move(promise))->send(channel_id);
}

View File

@ -30,7 +30,7 @@ class GroupCallManager : public Actor {
GroupCallManager &operator=(GroupCallManager &&) = delete;
~GroupCallManager() override;
void create_group_call(ChannelId channel_id, Promise<InputGroupCallId> &&promise);
void create_voice_chat(ChannelId channel_id, Promise<InputGroupCallId> &&promise);
void join_group_call(InputGroupCallId group_call_id, td_api::object_ptr<td_api::groupCallPayload> &&payload,
int32 source, bool is_muted,

View File

@ -6027,7 +6027,7 @@ void Td::on_request(uint64 id, td_api::sendCallDebugInformation &request) {
std::move(request.debug_information_), std::move(promise));
}
void Td::on_request(uint64 id, const td_api::createChatGroupCall &request) {
void Td::on_request(uint64 id, const td_api::createVoiceChat &request) {
CHECK_IS_USER();
CREATE_REQUEST_PROMISE();
auto query_promise = PromiseCreator::lambda([promise = std::move(promise)](Result<InputGroupCallId> result) mutable {
@ -6038,7 +6038,7 @@ void Td::on_request(uint64 id, const td_api::createChatGroupCall &request) {
}
});
contacts_manager_->create_channel_group_call(DialogId(request.chat_id_), std::move(query_promise));
contacts_manager_->create_channel_voice_chat(DialogId(request.chat_id_), std::move(query_promise));
}
void Td::on_request(uint64 id, td_api::joinGroupCall &request) {

View File

@ -692,7 +692,7 @@ class Td final : public NetQueryCallback {
void on_request(uint64 id, td_api::sendCallDebugInformation &request);
void on_request(uint64 id, const td_api::createChatGroupCall &request);
void on_request(uint64 id, const td_api::createVoiceChat &request);
void on_request(uint64 id, td_api::joinGroupCall &request);

View File

@ -2838,8 +2838,8 @@ class CliClient final : public Actor {
as_call_id(call_id), to_integer<int32>(rating), "Wow, such good call! (TDLib test)", std::move(problems)));
} else if (op == "scdi" || op == "SendCallDebugInformation") {
send_request(td_api::make_object<td_api::sendCallDebugInformation>(as_call_id(args), "{}"));
} else if (op == "ccgc") {
send_request(td_api::make_object<td_api::createChatGroupCall>(as_chat_id(args)));
} else if (op == "cvc") {
send_request(td_api::make_object<td_api::createVoiceChat>(as_chat_id(args)));
} else if (op == "jgc") {
vector<td_api::object_ptr<td_api::groupCallPayloadFingerprint>> fingerprints;
fingerprints.push_back(td_api::make_object<td_api::groupCallPayloadFingerprint>("hash", "setup", "fingerprint"));