Update layer 123.

This commit is contained in:
levlam 2021-01-26 02:00:12 +03:00
parent 60b76e89aa
commit f77adeb28c
8 changed files with 30 additions and 30 deletions

View File

@ -2131,10 +2131,9 @@ groupCallJoinResponse payload:groupCallPayload candidates:vector<groupCallJoinRe
//@can_be_unmuted_only_for_self True, if the current user can unmute the participant for self
//@is_muted True, if the participant is muted
//@can_unmute_self True, if the participant can unmute themself
//@mute_only_for_self_count Number of times the participant is muted by other participants
//@volume_level Participant's volume level; 1-20000 in hundreds of percents
//@order User's order in the group call participant list. The bigger is order, the higher is user in the list. If order is 0, the user must be removed from the participant list
groupCallParticipant user_id:int32 source:int32 is_speaking:Bool can_be_muted_for_all_users:Bool can_be_unmuted_for_all_users:Bool can_be_muted_only_for_self:Bool can_be_unmuted_only_for_self:Bool is_muted:Bool can_unmute_self:Bool mute_only_for_self_count:int32 volume_level:int32 order:int64 = GroupCallParticipant;
groupCallParticipant user_id:int32 source:int32 is_speaking:Bool can_be_muted_for_all_users:Bool can_be_unmuted_for_all_users:Bool can_be_muted_only_for_self:Bool can_be_unmuted_only_for_self:Bool is_muted:Bool can_unmute_self:Bool volume_level:int32 order:int64 = GroupCallParticipant;
//@class CallProblem @description Describes the exact type of a problem with a call

Binary file not shown.

View File

@ -204,7 +204,7 @@ inputPeerNotifySettings#9c3d198e flags:# show_previews:flags.0?Bool silent:flags
peerNotifySettings#af509d20 flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int sound:flags.3?string = PeerNotifySettings;
peerSettings#733f2961 flags:# report_spam:flags.0?true add_contact:flags.1?true block_contact:flags.2?true share_contact:flags.3?true need_contacts_exception:flags.4?true report_geo:flags.5?true autoarchived:flags.7?true geo_distance:flags.6?int = PeerSettings;
peerSettings#733f2961 flags:# report_spam:flags.0?true add_contact:flags.1?true block_contact:flags.2?true share_contact:flags.3?true need_contacts_exception:flags.4?true report_geo:flags.5?true autoarchived:flags.7?true invite_members:flags.8?true geo_distance:flags.6?int = PeerSettings;
wallPaper#a437c3ed id:long flags:# creator:flags.0?true default:flags.1?true pattern:flags.3?true dark:flags.4?true access_hash:long slug:string document:Document settings:flags.2?WallPaperSettings = WallPaper;
wallPaperNoFile#8af40b25 flags:# default:flags.1?true dark:flags.4?true settings:flags.2?WallPaperSettings = WallPaper;
@ -1183,7 +1183,7 @@ groupCall#55903081 flags:# join_muted:flags.1?true can_change_join_muted:flags.2
inputGroupCall#d8aa840f id:long access_hash:long = InputGroupCall;
groupCallParticipant#b881f32b flags:# muted:flags.0?true left:flags.1?true can_self_unmute:flags.2?true just_joined:flags.4?true versioned:flags.5?true muted_by_you:flags.9?true user_id:int date:int active_date:flags.3?int source:int volume:flags.7?int muted_cnt:flags.8?int = GroupCallParticipant;
groupCallParticipant#64c62a15 flags:# muted:flags.0?true left:flags.1?true can_self_unmute:flags.2?true just_joined:flags.4?true versioned:flags.5?true muted_by_you:flags.9?true user_id:int date:int active_date:flags.3?int source:int volume:flags.7?int = GroupCallParticipant;
phone.groupCall#66ab0bfc call:GroupCall participants:Vector<GroupCallParticipant> participants_next_offset:string users:Vector<User> = phone.GroupCall;
@ -1205,7 +1205,9 @@ messages.chatInviteImporters#81b6b00a count:int importers:Vector<ChatInviteImpor
messages.historyImport#1662af0b id:long = messages.HistoryImport;
messages.historyImportParsed#8d94ab42 flags:# pm:flags.0?true group:flags.1?true title:flags.1?string = messages.HistoryImportParsed;
messages.historyImportParsed#5e0fb7b9 flags:# pm:flags.0?true group:flags.1?true title:flags.2?string = messages.HistoryImportParsed;
messages.affectedFoundMessages#ef8d3e6c pts:int pts_count:int offset:int messages:Vector<int> = messages.AffectedFoundMessages;
---functions---
@ -1366,7 +1368,7 @@ messages.readMessageContents#36a73f77 id:Vector<int> = messages.AffectedMessages
messages.getStickers#43d4f2c emoticon:string hash:int = messages.Stickers;
messages.getAllStickers#1c9618b1 hash:int = messages.AllStickers;
messages.getWebPagePreview#8b68b0cc flags:# message:string entities:flags.3?Vector<MessageEntity> = MessageMedia;
messages.exportChatInvite#14b9bcd7 flags:# legacy_revoke_permanent:flags.2?true peer:InputPeer expire_date:flags.0?int usage_limit:flags.1?int = ExportedChatInvite;
messages.exportChatInvite#df7534c peer:InputPeer = ExportedChatInvite;
messages.checkChatInvite#3eadb1bb hash:string = ChatInvite;
messages.importChatInvite#6c50051c hash:string = Updates;
messages.getStickerSet#2619a90e stickerset:InputStickerSet = messages.StickerSet;
@ -1462,7 +1464,7 @@ messages.deleteRevokedExportedChatInvites#52041463 peer:InputPeer = Bool;
messages.deleteExportedChatInvite#d464a42b peer:InputPeer link:string = Bool;
messages.getChatInviteImporters#26fb7289 peer:InputPeer link:string offset_date:int offset_user:InputUser limit:int = messages.ChatInviteImporters;
messages.deleteChat#83247d11 chat_id:int = Bool;
messages.deletePhoneCallHistory#6cff1b45 flags:# revoke:flags.0?true = messages.AffectedHistory;
messages.deletePhoneCallHistory#f9cbe409 flags:# revoke:flags.0?true = messages.AffectedFoundMessages;
messages.checkHistoryImport#43fe19f3 import_head:string = messages.HistoryImportParsed;
messages.initHistoryImport#34090c3b peer:InputPeer file:InputFile media_count:int = messages.HistoryImport;
messages.uploadImportedMedia#2a862092 peer:InputPeer import_id:long file_name:string media:InputMedia = MessageMedia;

Binary file not shown.

View File

@ -1582,7 +1582,9 @@ class ExportChatInviteLinkQuery : public Td::ResultHandler {
if (input_peer == nullptr) {
return on_error(0, Status::Error(400, "Can't access the chat"));
}
CHECK(is_permanent);
/*
int32 flags = 0;
if (expire_date > 0) {
flags |= telegram_api::messages_exportChatInvite::EXPIRE_DATE_MASK;
@ -1593,8 +1595,11 @@ class ExportChatInviteLinkQuery : public Td::ResultHandler {
if (is_permanent) {
flags |= telegram_api::messages_exportChatInvite::LEGACY_REVOKE_PERMANENT_MASK;
}
send_query(G()->net_query_creator().create(telegram_api::messages_exportChatInvite(
flags, false /*ignored*/, std::move(input_peer), expire_date, usage_limit)));
*/
send_query(G()->net_query_creator().create(telegram_api::messages_exportChatInvite(std::move(input_peer))));
// send_query(G()->net_query_creator().create(telegram_api::messages_exportChatInvite(
// flags, false /*ignored*/, std::move(input_peer), expire_date, usage_limit)));
}
void on_result(uint64 id, BufferSlice packet) override {

View File

@ -19,13 +19,6 @@ GroupCallParticipant::GroupCallParticipant(const tl_object_ptr<telegram_api::gro
is_muted = participant->muted_;
can_self_unmute = participant->can_self_unmute_;
is_muted_only_for_self = participant->muted_by_you_;
if ((participant->flags_ & telegram_api::groupCallParticipant::MUTED_CNT_MASK) != 0) {
muted_count = participant->muted_cnt_;
if (muted_count < 0) {
LOG(ERROR) << "Receive " << to_string(participant);
muted_count = 0;
}
}
if ((participant->flags_ & telegram_api::groupCallParticipant::VOLUME_MASK) != 0) {
volume_level = participant->volume_;
if (volume_level < MIN_VOLUME_LEVEL || volume_level > MAX_VOLUME_LEVEL) {
@ -95,11 +88,11 @@ td_api::object_ptr<td_api::groupCallParticipant> GroupCallParticipant::get_group
return td_api::make_object<td_api::groupCallParticipant>(
contacts_manager->get_user_id_object(user_id, "get_group_call_participant_object"), audio_source, is_speaking,
can_be_muted_for_all_users, can_be_unmuted_for_all_users, can_be_muted_only_for_self,
can_be_unmuted_only_for_self, is_muted, can_self_unmute, muted_count, volume_level, order);
can_be_unmuted_only_for_self, is_muted, can_self_unmute, volume_level, order);
}
bool operator==(const GroupCallParticipant &lhs, const GroupCallParticipant &rhs) {
return lhs.user_id == rhs.user_id && lhs.audio_source == rhs.audio_source && lhs.muted_count == rhs.muted_count &&
return lhs.user_id == rhs.user_id && lhs.audio_source == rhs.audio_source &&
lhs.can_be_muted_for_all_users == rhs.can_be_muted_for_all_users &&
lhs.can_be_unmuted_for_all_users == rhs.can_be_unmuted_for_all_users &&
lhs.can_be_muted_only_for_self == rhs.can_be_muted_only_for_self &&

View File

@ -22,7 +22,6 @@ struct GroupCallParticipant {
int32 audio_source = 0;
int32 joined_date = 0;
int32 active_date = 0;
int32 muted_count = 0;
int32 volume_level = 10000;
bool is_muted = false;
bool can_self_unmute = false;

View File

@ -2512,20 +2512,22 @@ class DeletePhoneCallHistoryQuery : public Td::ResultHandler {
return on_error(id, result_ptr.move_as_error());
}
auto affected_history = result_ptr.move_as_ok();
CHECK(affected_history->get_id() == telegram_api::messages_affectedHistory::ID);
auto affected_messages = result_ptr.move_as_ok();
CHECK(affected_messages->get_id() == telegram_api::messages_affectedFoundMessages::ID);
if (affected_history->pts_count_ > 0) {
affected_history->pts_count_ = 0; // force receiving real updates from the server
auto promise = affected_history->offset_ > 0 ? Promise<Unit>() : std::move(promise_);
td->updates_manager_->add_pending_pts_update(make_tl_object<dummyUpdate>(), affected_history->pts_,
affected_history->pts_count_, std::move(promise),
if (affected_messages->pts_count_ > 0) {
auto promise = affected_messages->offset_ > 0 ? Promise<Unit>() : std::move(promise_);
auto pts = affected_messages->pts_;
auto pts_count = affected_messages->pts_count_;
auto update =
make_tl_object<telegram_api::updateDeleteMessages>(std::move(affected_messages->messages_), pts, pts_count);
td->updates_manager_->add_pending_pts_update(std::move(update), pts, pts_count, std::move(promise),
"delete phone call history query");
} else if (affected_history->offset_ <= 0) {
} else if (affected_messages->offset_ <= 0) {
promise_.set_value(Unit());
}
if (affected_history->offset_ > 0) {
if (affected_messages->offset_ > 0) {
send_request();
return;
}
@ -4278,7 +4280,7 @@ class UpdatePeerSettingsQuery : public Td::ResultHandler {
dialog_id_,
make_tl_object<telegram_api::peerSettings>(0, false /*ignored*/, false /*ignored*/, false /*ignored*/,
false /*ignored*/, false /*ignored*/, false /*ignored*/,
false /*ignored*/, 0),
false /*ignored*/, false /*ignored*/, 0),
true);
promise_.set_value(Unit());
@ -4320,7 +4322,7 @@ class ReportEncryptedSpamQuery : public Td::ResultHandler {
dialog_id_,
make_tl_object<telegram_api::peerSettings>(0, false /*ignored*/, false /*ignored*/, false /*ignored*/,
false /*ignored*/, false /*ignored*/, false /*ignored*/,
false /*ignored*/, 0),
false /*ignored*/, false /*ignored*/, 0),
true);
promise_.set_value(Unit());