Rename voice chats to video chats.

This commit is contained in:
levlam 2021-10-14 15:44:21 +03:00
parent bcf0316432
commit c69293e1cc
10 changed files with 102 additions and 102 deletions

View File

@ -461,7 +461,7 @@ chatPermissions can_send_messages:Bool can_send_media_messages:Bool can_send_pol
//@is_member True, if the user is a member of the chat
chatMemberStatusCreator custom_title:string is_anonymous:Bool is_member:Bool = ChatMemberStatus;
//@description The user is a member of the chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, ban unprivileged members, and manage voice chats. In supergroups and channels, there are more detailed options for administrator privileges
//@description The user is a member of the chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, ban unprivileged members, and manage video chats. In supergroups and channels, there are more detailed options for administrator privileges
//@custom_title A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only
//@can_be_edited True, if the current user can edit the administrator privileges for the called user
//@can_manage_chat True, if the administrator can get chat event log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
@ -473,9 +473,9 @@ chatMemberStatusCreator custom_title:string is_anonymous:Bool is_member:Bool = C
//@can_restrict_members True, if the administrator can restrict, ban, or unban chat members; always true for channels
//@can_pin_messages True, if the administrator can pin messages; applicable to basic groups and supergroups only
//@can_promote_members True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them
//@can_manage_voice_chats True, if the administrator can manage voice chats
//@can_manage_video_chats True, if the administrator can manage video chats
//@is_anonymous True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only
chatMemberStatusAdministrator custom_title:string can_be_edited:Bool can_manage_chat:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_promote_members:Bool can_manage_voice_chats:Bool is_anonymous:Bool = ChatMemberStatus;
chatMemberStatusAdministrator custom_title:string can_be_edited:Bool can_manage_chat:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_promote_members:Bool can_manage_video_chats:Bool is_anonymous:Bool = ChatMemberStatus;
//@description The user is a member of the chat, without any additional privileges or restrictions
chatMemberStatusMember = ChatMemberStatus;
@ -489,7 +489,7 @@ chatMemberStatusRestricted is_member:Bool restricted_until_date:int32 permission
//@description The user or the chat is not a chat member
chatMemberStatusLeft = ChatMemberStatus;
//@description The user or the chat was banned (and hence is not a member of the chat). Implies the user can't return to the chat, view messages, or be used as a participant identifier to join a voice chat of the chat
//@description The user or the chat was banned (and hence is not a member of the chat). Implies the user can't return to the chat, view messages, or be used as a participant identifier to join a video chat of the chat
//@banned_until_date Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Always 0 in basic groups
chatMemberStatusBanned banned_until_date:int32 = ChatMemberStatus;
@ -923,11 +923,11 @@ chatSourcePublicServiceAnnouncement type:string text:string = ChatSource;
chatPosition list:ChatList order:int64 is_pinned:Bool source:ChatSource = ChatPosition;
//@description Describes a voice chat
//@group_call_id Group call identifier of an active voice chat; 0 if none. Full information about the voice chat can be received through the method getGroupCall
//@has_participants True, if the voice chat has participants
//@default_participant_id Default group call participant identifier to join the voice chat; may be null
voiceChat group_call_id:int32 has_participants:Bool default_participant_id:MessageSender = VoiceChat;
//@description Describes a video chat
//@group_call_id Group call identifier of an active video chat; 0 if none. Full information about the video chat can be received through the method getGroupCall
//@has_participants True, if the video chat has participants
//@default_participant_id Default group call participant identifier to join the video chat; may be null
videoChat group_call_id:int32 has_participants:Bool default_participant_id:MessageSender = VideoChat;
//@description A chat. (Can be a private chat, basic group, supergroup, or secret chat)
@ -953,12 +953,12 @@ voiceChat group_call_id:int32 has_participants:Bool default_participant_id:Messa
//@message_ttl_setting Current message Time To Live setting (self-destruct timer) for the chat; 0 if not defined. TTL is counted from the time message or its content is viewed in secret chats and from the send date in other chats
//@theme_name If non-empty, name of a theme, set for the chat
//@action_bar Describes actions which must be possible to do through a chat action bar; may be null
//@voice_chat Contains information about voice chat of the chat
//@video_chat Contains information about video chat of the chat
//@pending_join_request_count Number of pending join requests, waiting administrator's approval
//@reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat
//@draft_message A draft of a message in the chat; may be null
//@client_data Contains application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used
chat id:int53 type:ChatType title:string photo:chatPhotoInfo permissions:chatPermissions last_message:message positions:vector<chatPosition> is_marked_as_unread:Bool is_blocked:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 notification_settings:chatNotificationSettings message_ttl_setting:int32 theme_name:string action_bar:ChatActionBar voice_chat:voiceChat pending_join_request_count:int53 reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat;
chat id:int53 type:ChatType title:string photo:chatPhotoInfo permissions:chatPermissions last_message:message positions:vector<chatPosition> is_marked_as_unread:Bool is_blocked:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 notification_settings:chatNotificationSettings message_ttl_setting:int32 theme_name:string action_bar:ChatActionBar video_chat:videoChat pending_join_request_count:int53 reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat;
//@description Represents a list of chats @total_count Approximate total count of chats found @chat_ids List of chat identifiers
chats total_count:int32 chat_ids:vector<int53> = Chats;
@ -1751,17 +1751,17 @@ messageInvoice title:string description:string photo:photo currency:string total
//@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 new voice chat was scheduled @group_call_id Identifier of the voice chat. The voice chat can be received through the method getGroupCall @start_date Point in time (Unix timestamp) when the group call is supposed to be started by an administrator
messageVoiceChatScheduled group_call_id:int32 start_date:int32 = MessageContent;
//@description A new video chat was scheduled @group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall @start_date Point in time (Unix timestamp) when the group call is supposed to be started by an administrator
messageVideoChatScheduled group_call_id:int32 start_date:int32 = MessageContent;
//@description A newly created voice chat @group_call_id Identifier of the voice chat. The voice chat can be received through the method getGroupCall
messageVoiceChatStarted group_call_id:int32 = MessageContent;
//@description A newly created video chat @group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall
messageVideoChatStarted group_call_id:int32 = MessageContent;
//@description A message with information about an ended voice chat @duration Call duration, in seconds
messageVoiceChatEnded duration:int32 = MessageContent;
//@description A message with information about an ended video chat @duration Call duration, in seconds
messageVideoChatEnded duration:int32 = MessageContent;
//@description A message with information about an invite to a voice chat @group_call_id Identifier of the voice chat. The voice chat can be received through the method getGroupCall @user_ids Invited user identifiers
messageInviteVoiceChatParticipants group_call_id:int32 user_ids:vector<int53> = MessageContent;
//@description A message with information about an invite to a video chat @group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall @user_ids Invited user identifiers
messageInviteVideoChatParticipants group_call_id:int32 user_ids:vector<int53> = 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<int53> = MessageContent;
@ -2579,20 +2579,20 @@ chatEventInviteLinkRevoked invite_link:chatInviteLink = ChatEventAction;
//@description A revoked chat invite link was deleted @invite_link The invite link
chatEventInviteLinkDeleted invite_link:chatInviteLink = ChatEventAction;
//@description A voice chat was created @group_call_id Identifier of the voice chat. The voice chat can be received through the method getGroupCall
chatEventVoiceChatCreated group_call_id:int32 = ChatEventAction;
//@description A video chat was created @group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall
chatEventVideoChatCreated group_call_id:int32 = ChatEventAction;
//@description A voice chat was discarded @group_call_id Identifier of the voice chat. The voice chat can be received through the method getGroupCall
chatEventVoiceChatDiscarded group_call_id:int32 = ChatEventAction;
//@description A video chat was discarded @group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall
chatEventVideoChatDiscarded group_call_id:int32 = ChatEventAction;
//@description A voice chat participant was muted or unmuted @participant_id Identifier of the affected group call participant @is_muted New value of is_muted
chatEventVoiceChatParticipantIsMutedToggled participant_id:MessageSender is_muted:Bool = ChatEventAction;
//@description A video chat participant was muted or unmuted @participant_id Identifier of the affected group call participant @is_muted New value of is_muted
chatEventVideoChatParticipantIsMutedToggled participant_id:MessageSender is_muted:Bool = ChatEventAction;
//@description A voice chat participant volume level was changed @participant_id Identifier of the affected group call participant @volume_level New value of volume_level; 1-20000 in hundreds of percents
chatEventVoiceChatParticipantVolumeLevelChanged participant_id:MessageSender volume_level:int32 = ChatEventAction;
//@description A video chat participant volume level was changed @participant_id Identifier of the affected group call participant @volume_level New value of volume_level; 1-20000 in hundreds of percents
chatEventVideoChatParticipantVolumeLevelChanged participant_id:MessageSender volume_level:int32 = ChatEventAction;
//@description The mute_new_participants setting of a voice chat was toggled @mute_new_participants New value of the mute_new_participants setting
chatEventVoiceChatMuteNewParticipantsToggled mute_new_participants:Bool = ChatEventAction;
//@description The mute_new_participants setting of a video chat was toggled @mute_new_participants New value of the mute_new_participants setting
chatEventVideoChatMuteNewParticipantsToggled mute_new_participants:Bool = ChatEventAction;
//@description Represents a chat event @id Chat event identifier @date Point in time (Unix timestamp) when the event happened @user_id Identifier of the user who performed the action that triggered the event @action Action performed by the user
chatEvent id:int64 date:int32 user_id:int53 action:ChatEventAction = ChatEvent;
@ -2612,8 +2612,8 @@ chatEvents events:vector<chatEvent> = ChatEvents;
//@info_changes True, if changes in chat information need to be returned
//@setting_changes True, if changes in chat settings need to be returned
//@invite_link_changes True, if changes to invite links need to be returned
//@voice_chat_changes True, if voice chat actions need to be returned
chatEventLogFilters message_edits:Bool message_deletions:Bool message_pins:Bool member_joins:Bool member_leaves:Bool member_invites:Bool member_promotions:Bool member_restrictions:Bool info_changes:Bool setting_changes:Bool invite_link_changes:Bool voice_chat_changes:Bool = ChatEventLogFilters;
//@video_chat_changes True, if video chat actions need to be returned
chatEventLogFilters message_edits:Bool message_deletions:Bool message_pins:Bool member_joins:Bool member_leaves:Bool member_invites:Bool member_promotions:Bool member_restrictions:Bool info_changes:Bool setting_changes:Bool invite_link_changes:Bool video_chat_changes:Bool = ChatEventLogFilters;
//@class LanguagePackStringValue @description Represents the value of a string in a language pack
@ -3202,10 +3202,10 @@ internalLinkTypeThemeSettings = InternalLinkType;
//@description The link is an unknown tg: link. Call getDeepLinkInfo to process the link @link Link to be passed to getDeepLinkInfo
internalLinkTypeUnknownDeepLink link:string = InternalLinkType;
//@description The link is a link to a voice chat. Call searchPublicChat with the given chat username, and then joinGoupCall with the given invite hash to process the link
//@chat_username Username of the chat with the voice chat @invite_hash If non-empty, invite hash to be used to join the voice chat without being muted by administrators
//@is_live_stream True, if the voice chat is expected to be a live stream in a channel or a broadcast group
internalLinkTypeVoiceChat chat_username:string invite_hash:string is_live_stream:Bool = InternalLinkType;
//@description The link is a link to a video chat. Call searchPublicChat with the given chat username, and then joinGoupCall with the given invite hash to process the link
//@chat_username Username of the chat with the video chat @invite_hash If non-empty, invite hash to be used to join the video chat without being muted by administrators
//@is_live_stream True, if the video chat is expected to be a live stream in a channel or a broadcast group
internalLinkTypeVideoChat chat_username:string invite_hash:string is_live_stream:Bool = InternalLinkType;
//@description Contains an HTTPS link to a message in a supergroup or channel @link Message link @is_public True, if the link will work for non-members of the chat
@ -3681,8 +3681,8 @@ updateChatIsBlocked chat_id:int53 is_blocked:Bool = Update;
//@description A chat's has_scheduled_messages field has changed @chat_id Chat identifier @has_scheduled_messages New value of has_scheduled_messages
updateChatHasScheduledMessages chat_id:int53 has_scheduled_messages:Bool = Update;
//@description A chat voice chat state has changed @chat_id Chat identifier @voice_chat New value of voice_chat
updateChatVoiceChat chat_id:int53 voice_chat:voiceChat = Update;
//@description A chat video chat state has changed @chat_id Chat identifier @video_chat New value of video_chat
updateChatVideoChat chat_id:int53 video_chat:videoChat = Update;
//@description The value of the default disable_notification parameter, used when a message is sent to the chat, was changed @chat_id Chat identifier @default_disable_notification The new default_disable_notification value
updateChatDefaultDisableNotification chat_id:int53 default_disable_notification:Bool = Update;
@ -4968,17 +4968,17 @@ sendCallRating call_id:int32 rating:int32 comment:string problems:vector<CallPro
sendCallDebugInformation call_id:int32 debug_information:string = Ok;
//@description Returns list of participant identifiers, which can be used to join voice chats in a chat @chat_id Chat identifier
getVoiceChatAvailableParticipants chat_id:int53 = MessageSenders;
//@description Returns list of participant identifiers, which can be used to join video chats in a chat @chat_id Chat identifier
getVideoChatAvailableParticipants chat_id:int53 = MessageSenders;
//@description Changes default participant identifier, which can be used to join voice chats in a chat @chat_id Chat identifier @default_participant_id Default group call participant identifier to join the voice chats
setVoiceChatDefaultParticipant chat_id:int53 default_participant_id:MessageSender = Ok;
//@description Changes default participant identifier, which can be used to join video chats in a chat @chat_id Chat identifier @default_participant_id Default group call participant identifier to join the video chats
setVideoChatDefaultParticipant chat_id:int53 default_participant_id:MessageSender = Ok;
//@description Creates a voice chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_voice_chats rights
//@chat_id Chat identifier, in which the voice chat will be created
//@description Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats rights
//@chat_id Chat identifier, in which the video chat will be created
//@title Group call title; if empty, chat title will be used
//@start_date Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 to start the voice chat immediately. The date must be at least 10 seconds and at most 8 days in the future
createVoiceChat chat_id:int53 title:string start_date:int32 = GroupCallId;
//@start_date Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future
createVideoChat chat_id:int53 title:string start_date:int32 = GroupCallId;
//@description Returns information about a group call @group_call_id Group call identifier
getGroupCall group_call_id:int32 = GroupCall;
@ -4992,7 +4992,7 @@ toggleGroupCallEnabledStartNotification group_call_id:int32 enabled_start_notifi
//@description Joins an active group call. Returns join response payload for tgcalls
//@group_call_id Group call identifier
//@participant_id Identifier of a group call participant, which will be used to join the call; pass null to join as self; voice chats only
//@participant_id Identifier of a group call participant, which will be used to join the call; pass null to join as self; video chats only
//@audio_source_id Caller audio channel synchronization source identifier; received from tgcalls
//@payload Group call join payload; received from tgcalls
//@is_muted True, if the user's microphone is muted
@ -5022,11 +5022,11 @@ toggleGroupCallMuteNewParticipants group_call_id:int32 mute_new_participants:Boo
//@description Revokes invite link for a group call. Requires groupCall.can_be_managed group call flag @group_call_id Group call identifier
revokeGroupCallInviteLink group_call_id:int32 = Ok;
//@description Invites users to an active group call. Sends a service message of type messageInviteToGroupCall for voice chats
//@description Invites users to an active group call. Sends a service message of type messageInviteToGroupCall for video chats
//@group_call_id Group call identifier @user_ids User identifiers. At most 10 users can be invited simultaneously
inviteGroupCallParticipants group_call_id:int32 user_ids:vector<int53> = Ok;
//@description Returns invite link to a voice chat in a public chat
//@description Returns invite link to a video chat in a public chat
//@group_call_id Group call identifier
//@can_self_unmute Pass true if the invite link needs to contain an invite hash, passing which to joinGroupCall would allow the invited user to unmute themselves. Requires groupCall.can_be_managed group call flag
getGroupCallInviteLink group_call_id:int32 can_self_unmute:Bool = HttpUrl;

View File

@ -422,7 +422,7 @@ DialogParticipantStatus get_dialog_participant_status(const tl_object_ptr<td_api
return DialogParticipantStatus::Administrator(
st->is_anonymous_, custom_title, true /*st->can_be_edited_*/, st->can_manage_chat_, st->can_change_info_,
st->can_post_messages_, st->can_edit_messages_, st->can_delete_messages_, st->can_invite_users_,
st->can_restrict_members_, st->can_pin_messages_, st->can_promote_members_, st->can_manage_voice_chats_);
st->can_restrict_members_, st->can_pin_messages_, st->can_promote_members_, st->can_manage_video_chats_);
}
case td_api::chatMemberStatusMember::ID:
return DialogParticipantStatus::Member();

View File

@ -360,7 +360,7 @@ class LinkManager::InternalLinkVoiceChat final : public InternalLink {
bool is_live_stream_;
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
return td_api::make_object<td_api::internalLinkTypeVoiceChat>(dialog_username_, invite_hash_, is_live_stream_);
return td_api::make_object<td_api::internalLinkTypeVideoChat>(dialog_username_, invite_hash_, is_live_stream_);
}
public:

View File

@ -4984,19 +4984,19 @@ tl_object_ptr<td_api::MessageContent> get_message_content_object(const MessageCo
case MessageContentType::GroupCall: {
const auto *m = static_cast<const MessageGroupCall *>(content);
if (m->duration >= 0) {
return make_tl_object<td_api::messageVoiceChatEnded>(m->duration);
return make_tl_object<td_api::messageVideoChatEnded>(m->duration);
} else {
auto group_call_id = td->group_call_manager_->get_group_call_id(m->input_group_call_id, DialogId()).get();
if (m->schedule_date > 0) {
return make_tl_object<td_api::messageVoiceChatScheduled>(group_call_id, m->schedule_date);
return make_tl_object<td_api::messageVideoChatScheduled>(group_call_id, m->schedule_date);
} else {
return make_tl_object<td_api::messageVoiceChatStarted>(group_call_id);
return make_tl_object<td_api::messageVideoChatStarted>(group_call_id);
}
}
}
case MessageContentType::InviteToGroupCall: {
const auto *m = static_cast<const MessageInviteToGroupCall *>(content);
return make_tl_object<td_api::messageInviteVoiceChatParticipants>(
return make_tl_object<td_api::messageInviteVideoChatParticipants>(
td->group_call_manager_->get_group_call_id(m->input_group_call_id, DialogId()).get(),
td->contacts_manager_->get_user_ids_object(m->user_ids, "MessageInviteToGroupCall"));
}

View File

@ -20075,13 +20075,13 @@ string MessagesManager::get_dialog_theme_name(const Dialog *d) const {
return d->theme_name;
}
td_api::object_ptr<td_api::voiceChat> MessagesManager::get_voice_chat_object(const Dialog *d) const {
td_api::object_ptr<td_api::videoChat> MessagesManager::get_video_chat_object(const Dialog *d) const {
auto active_group_call_id = td_->group_call_manager_->get_group_call_id(d->active_group_call_id, d->dialog_id);
auto default_participant_alias =
d->default_join_group_call_as_dialog_id.is_valid()
? get_message_sender_object_const(d->default_join_group_call_as_dialog_id, "get_voice_chat_object")
? get_message_sender_object_const(d->default_join_group_call_as_dialog_id, "get_video_chat_object")
: nullptr;
return make_tl_object<td_api::voiceChat>(active_group_call_id.get(),
return make_tl_object<td_api::videoChat>(active_group_call_id.get(),
active_group_call_id.is_valid() ? !d->is_group_call_empty : false,
std::move(default_participant_alias));
}
@ -20156,7 +20156,7 @@ td_api::object_ptr<td_api::chat> MessagesManager::get_chat_object(const Dialog *
d->last_read_inbox_message_id.get(), d->last_read_outbox_message_id.get(), d->unread_mention_count,
get_chat_notification_settings_object(&d->notification_settings),
d->message_ttl_setting.get_message_ttl_setting_object(), get_dialog_theme_name(d), get_chat_action_bar_object(d),
get_voice_chat_object(d), d->pending_join_request_count, d->reply_markup_message_id.get(),
get_video_chat_object(d), d->pending_join_request_count, d->reply_markup_message_id.get(),
std::move(draft_message), d->client_data);
}
@ -28864,12 +28864,12 @@ void MessagesManager::send_update_chat_pending_join_request_count(const Dialog *
d->pending_join_request_count));
}
void MessagesManager::send_update_chat_voice_chat(const Dialog *d) {
void MessagesManager::send_update_chat_video_chat(const Dialog *d) {
CHECK(d != nullptr);
LOG_CHECK(d->is_update_new_chat_sent) << "Wrong " << d->dialog_id << " in send_update_chat_voice_chat";
on_dialog_updated(d->dialog_id, "send_update_chat_voice_chat");
LOG_CHECK(d->is_update_new_chat_sent) << "Wrong " << d->dialog_id << " in send_update_chat_video_chat";
on_dialog_updated(d->dialog_id, "send_update_chat_video_chat");
send_closure(G()->td(), &Td::send_update,
td_api::make_object<td_api::updateChatVoiceChat>(d->dialog_id.get(), get_voice_chat_object(d)));
td_api::make_object<td_api::updateChatVideoChat>(d->dialog_id.get(), get_video_chat_object(d)));
}
void MessagesManager::send_update_chat_message_ttl_setting(const Dialog *d) {
@ -30144,10 +30144,10 @@ void MessagesManager::on_update_dialog_group_call(DialogId dialog_id, bool has_a
d->active_group_call_id = InputGroupCallId();
d->has_active_group_call = false;
d->is_group_call_empty = false;
send_update_chat_voice_chat(d);
send_update_chat_video_chat(d);
} else if (d->has_active_group_call && has_active_group_call) {
d->is_group_call_empty = is_group_call_empty;
send_update_chat_voice_chat(d);
send_update_chat_video_chat(d);
} else {
d->has_active_group_call = has_active_group_call;
d->is_group_call_empty = is_group_call_empty;
@ -30176,7 +30176,7 @@ void MessagesManager::on_update_dialog_group_call_id(DialogId dialog_id, InputGr
d->is_group_call_empty = false;
}
}
send_update_chat_voice_chat(d);
send_update_chat_video_chat(d);
}
}
@ -30206,7 +30206,7 @@ void MessagesManager::on_update_dialog_default_join_group_call_as_dialog_id(Dial
if (d->default_join_group_call_as_dialog_id != default_join_as_dialog_id) {
d->default_join_group_call_as_dialog_id = default_join_as_dialog_id;
send_update_chat_voice_chat(d);
send_update_chat_video_chat(d);
}
}
@ -31710,7 +31710,7 @@ tl_object_ptr<telegram_api::channelAdminLogEventsFilter> MessagesManager::get_ch
if (filters->invite_link_changes_) {
flags |= telegram_api::channelAdminLogEventsFilter::INVITES_MASK;
}
if (filters->voice_chat_changes_) {
if (filters->video_chat_changes_) {
flags |= telegram_api::channelAdminLogEventsFilter::GROUP_CALL_MASK;
}
@ -32029,7 +32029,7 @@ tl_object_ptr<td_api::ChatEventAction> MessagesManager::get_chat_event_action_ob
if (!input_group_call_id.is_valid()) {
return nullptr;
}
return make_tl_object<td_api::chatEventVoiceChatCreated>(
return make_tl_object<td_api::chatEventVideoChatCreated>(
td_->group_call_manager_->get_group_call_id(input_group_call_id, DialogId(channel_id)).get());
}
case telegram_api::channelAdminLogEventActionDiscardGroupCall::ID: {
@ -32038,7 +32038,7 @@ tl_object_ptr<td_api::ChatEventAction> MessagesManager::get_chat_event_action_ob
if (!input_group_call_id.is_valid()) {
return nullptr;
}
return make_tl_object<td_api::chatEventVoiceChatDiscarded>(
return make_tl_object<td_api::chatEventVideoChatDiscarded>(
td_->group_call_manager_->get_group_call_id(input_group_call_id, DialogId(channel_id)).get());
}
case telegram_api::channelAdminLogEventActionParticipantMute::ID: {
@ -32047,8 +32047,8 @@ tl_object_ptr<td_api::ChatEventAction> MessagesManager::get_chat_event_action_ob
if (!participant.is_valid()) {
return nullptr;
}
return make_tl_object<td_api::chatEventVoiceChatParticipantIsMutedToggled>(
get_message_sender_object(participant.dialog_id, "chatEventVoiceChatParticipantIsMutedToggled"), true);
return make_tl_object<td_api::chatEventVideoChatParticipantIsMutedToggled>(
get_message_sender_object(participant.dialog_id, "chatEventVideoChatParticipantIsMutedToggled"), true);
}
case telegram_api::channelAdminLogEventActionParticipantUnmute::ID: {
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionParticipantUnmute>(action_ptr);
@ -32056,8 +32056,8 @@ tl_object_ptr<td_api::ChatEventAction> MessagesManager::get_chat_event_action_ob
if (!participant.is_valid()) {
return nullptr;
}
return make_tl_object<td_api::chatEventVoiceChatParticipantIsMutedToggled>(
get_message_sender_object(participant.dialog_id, "chatEventVoiceChatParticipantIsMutedToggled"), false);
return make_tl_object<td_api::chatEventVideoChatParticipantIsMutedToggled>(
get_message_sender_object(participant.dialog_id, "chatEventVideoChatParticipantIsMutedToggled"), false);
}
case telegram_api::channelAdminLogEventActionParticipantVolume::ID: {
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionParticipantVolume>(action_ptr);
@ -32065,13 +32065,13 @@ tl_object_ptr<td_api::ChatEventAction> MessagesManager::get_chat_event_action_ob
if (!participant.is_valid()) {
return nullptr;
}
return make_tl_object<td_api::chatEventVoiceChatParticipantVolumeLevelChanged>(
get_message_sender_object(participant.dialog_id, "chatEventVoiceChatParticipantVolumeLevelChanged"),
return make_tl_object<td_api::chatEventVideoChatParticipantVolumeLevelChanged>(
get_message_sender_object(participant.dialog_id, "chatEventVideoChatParticipantVolumeLevelChanged"),
participant.volume_level);
}
case telegram_api::channelAdminLogEventActionToggleGroupCallSetting::ID: {
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionToggleGroupCallSetting>(action_ptr);
return make_tl_object<td_api::chatEventVoiceChatMuteNewParticipantsToggled>(action->join_muted_);
return make_tl_object<td_api::chatEventVideoChatMuteNewParticipantsToggled>(action->join_muted_);
}
case telegram_api::channelAdminLogEventActionChangeHistoryTTL::ID: {
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionChangeHistoryTTL>(action_ptr);

View File

@ -2344,7 +2344,7 @@ class MessagesManager final : public Actor {
void send_update_chat_pending_join_request_count(const Dialog *d);
void send_update_chat_voice_chat(const Dialog *d);
void send_update_chat_video_chat(const Dialog *d);
void send_update_chat_message_ttl_setting(const Dialog *d);
@ -2539,7 +2539,7 @@ class MessagesManager final : public Actor {
string get_dialog_theme_name(const Dialog *d) const;
td_api::object_ptr<td_api::voiceChat> get_voice_chat_object(const Dialog *d) const;
td_api::object_ptr<td_api::videoChat> get_video_chat_object(const Dialog *d) const;
td_api::object_ptr<td_api::chat> get_chat_object(const Dialog *d) const;

View File

@ -5773,13 +5773,13 @@ 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::getVoiceChatAvailableParticipants &request) {
void Td::on_request(uint64 id, const td_api::getVideoChatAvailableParticipants &request) {
CHECK_IS_USER();
CREATE_REQUEST_PROMISE();
group_call_manager_->get_group_call_join_as(DialogId(request.chat_id_), std::move(promise));
}
void Td::on_request(uint64 id, const td_api::setVoiceChatDefaultParticipant &request) {
void Td::on_request(uint64 id, const td_api::setVideoChatDefaultParticipant &request) {
CHECK_IS_USER();
CREATE_OK_REQUEST_PROMISE();
group_call_manager_->set_group_call_default_join_as(
@ -5787,7 +5787,7 @@ void Td::on_request(uint64 id, const td_api::setVoiceChatDefaultParticipant &req
std::move(promise));
}
void Td::on_request(uint64 id, td_api::createVoiceChat &request) {
void Td::on_request(uint64 id, td_api::createVideoChat &request) {
CHECK_IS_USER();
CLEAN_INPUT_STRING(request.title_);
CREATE_REQUEST_PROMISE();

View File

@ -724,11 +724,11 @@ class Td final : public Actor {
void on_request(uint64 id, td_api::sendCallDebugInformation &request);
void on_request(uint64 id, const td_api::getVoiceChatAvailableParticipants &request);
void on_request(uint64 id, const td_api::getVideoChatAvailableParticipants &request);
void on_request(uint64 id, const td_api::setVoiceChatDefaultParticipant &request);
void on_request(uint64 id, const td_api::setVideoChatDefaultParticipant &request);
void on_request(uint64 id, td_api::createVoiceChat &request);
void on_request(uint64 id, td_api::createVideoChat &request);
void on_request(uint64 id, const td_api::getGroupCall &request);

View File

@ -2780,19 +2780,19 @@ class CliClient final : public Actor {
} else if (op == "scdi" || op == "SendCallDebugInformation") {
send_request(td_api::make_object<td_api::sendCallDebugInformation>(as_call_id(args), "{}"));
} else if (op == "gvcap") {
send_request(td_api::make_object<td_api::getVoiceChatAvailableParticipants>(as_chat_id(args)));
send_request(td_api::make_object<td_api::getVideoChatAvailableParticipants>(as_chat_id(args)));
} else if (op == "svcdp") {
string chat_id;
string participant_id;
get_args(args, chat_id, participant_id);
send_request(td_api::make_object<td_api::setVoiceChatDefaultParticipant>(as_chat_id(chat_id),
send_request(td_api::make_object<td_api::setVideoChatDefaultParticipant>(as_chat_id(chat_id),
as_message_sender(participant_id)));
} else if (op == "cvc") {
string chat_id;
string title;
int32 start_date;
get_args(args, chat_id, title, start_date);
send_request(td_api::make_object<td_api::createVoiceChat>(as_chat_id(chat_id), title, start_date));
send_request(td_api::make_object<td_api::createVideoChat>(as_chat_id(chat_id), title, start_date));
} else if (op == "ggc") {
send_request(td_api::make_object<td_api::getGroupCall>(as_group_call_id(args)));
} else if (op == "ggcss") {

View File

@ -171,8 +171,8 @@ TEST(Link, parse_internal_link) {
auto unknown_deep_link = [](const td::string &link) {
return td::td_api::make_object<td::td_api::internalLinkTypeUnknownDeepLink>(link);
};
auto voice_chat = [](const td::string &chat_username, const td::string &invite_hash, bool is_live_stream) {
return td::td_api::make_object<td::td_api::internalLinkTypeVoiceChat>(chat_username, invite_hash, is_live_stream);
auto video_chat = [](const td::string &chat_username, const td::string &invite_hash, bool is_live_stream) {
return td::td_api::make_object<td::td_api::internalLinkTypeVideoChat>(chat_username, invite_hash, is_live_stream);
};
parse_internal_link("t.me/levlam/1", message("tg:resolve?domain=levlam&post=1"));
@ -524,27 +524,27 @@ TEST(Link, parse_internal_link) {
parse_internal_link("tg:socks?server=google.com&port=8%30&user=&pass=2", proxy_socks("google.com", 80, "", "2"));
parse_internal_link("tg:socks?server=google.com&port=80&user=1&pass=2", proxy_socks("google.com", 80, "1", "2"));
parse_internal_link("tg:resolve?domain=username&voice%63hat=aasdasd", voice_chat("username", "aasdasd", false));
parse_internal_link("tg:resolve?domain=username&video%63hat=aasdasd", voice_chat("username", "aasdasd", false));
parse_internal_link("tg:resolve?domain=username&livestream=aasdasd", voice_chat("username", "aasdasd", true));
parse_internal_link("TG://resolve?domain=username&voicechat=", voice_chat("username", "", false));
parse_internal_link("tg:resolve?domain=username&voice%63hat=aasdasd", video_chat("username", "aasdasd", false));
parse_internal_link("tg:resolve?domain=username&video%63hat=aasdasd", video_chat("username", "aasdasd", false));
parse_internal_link("tg:resolve?domain=username&livestream=aasdasd", video_chat("username", "aasdasd", true));
parse_internal_link("TG://resolve?domain=username&voicechat=", video_chat("username", "", false));
parse_internal_link("TG://test@resolve?domain=username&voicechat=", nullptr);
parse_internal_link("tg:resolve:80?domain=username&voicechat=", nullptr);
parse_internal_link("tg:http://resolve?domain=username&voicechat=", nullptr);
parse_internal_link("tg:https://resolve?domain=username&voicechat=", nullptr);
parse_internal_link("tg:resolve?domain=&voicechat=", unknown_deep_link("tg://resolve?domain=&voicechat="));
parse_internal_link("tg:resolve?domain=telegram&&&&&&&voicechat=%30", voice_chat("telegram", "0", false));
parse_internal_link("tg:resolve?domain=telegram&&&&&&&voicechat=%30", video_chat("telegram", "0", false));
parse_internal_link("t.me/username/0/a//s/as?voicechat=", voice_chat("username", "", false));
parse_internal_link("t.me/username/0/a//s/as?videochat=2", voice_chat("username", "2", false));
parse_internal_link("t.me/username/0/a//s/as?livestream=3", voice_chat("username", "3", true));
parse_internal_link("t.me/username/aasdas?test=1&voicechat=#12312", voice_chat("username", "", false));
parse_internal_link("t.me/username/0?voicechat=", voice_chat("username", "", false));
parse_internal_link("t.me/username/-1?voicechat=asdasd", voice_chat("username", "asdasd", false));
parse_internal_link("t.me/username?voicechat=", voice_chat("username", "", false));
parse_internal_link("t.me/username/0/a//s/as?voicechat=", video_chat("username", "", false));
parse_internal_link("t.me/username/0/a//s/as?videochat=2", video_chat("username", "2", false));
parse_internal_link("t.me/username/0/a//s/as?livestream=3", video_chat("username", "3", true));
parse_internal_link("t.me/username/aasdas?test=1&voicechat=#12312", video_chat("username", "", false));
parse_internal_link("t.me/username/0?voicechat=", video_chat("username", "", false));
parse_internal_link("t.me/username/-1?voicechat=asdasd", video_chat("username", "asdasd", false));
parse_internal_link("t.me/username?voicechat=", video_chat("username", "", false));
parse_internal_link("t.me/username#voicechat=asdas", public_chat("username"));
parse_internal_link("t.me//username?voicechat=", nullptr);
parse_internal_link("https://telegram.dog/tele%63ram?voi%63e%63hat=t%63st", voice_chat("telecram", "tcst", false));
parse_internal_link("https://telegram.dog/tele%63ram?voi%63e%63hat=t%63st", video_chat("telecram", "tcst", false));
parse_internal_link("tg:resolve?domain=username&start=aasdasd", bot_start("username", "aasdasd"));
parse_internal_link("TG://resolve?domain=username&start=", bot_start("username", ""));