Fix archiveChatListSettings settings.

This commit is contained in:
levlam 2023-07-14 18:51:47 +03:00
parent ea17b2ca46
commit cbdd558d3a
3 changed files with 6 additions and 7 deletions

View File

@ -1412,8 +1412,8 @@ recommendedChatFolders chat_folders:vector<recommendedChatFolder> = RecommendedC
//@description Contains settings for automatic moving of chats to and from the Archive chat lists
//@archive_and_mute_new_chats_from_unknown_users True, if new chats from non-contacts will be automatically archived and muted. Can be set to true only if the option "can_archive_and_mute_new_chats_from_unknown_users" is true
//@keep_unmuted_chats_archived True, if unmuted chats will be kept in the Archive chat list when they get a new message
//@keep_chats_from_shareable_folders_archived True, if unmuted chats added via a shareable folder will be kept in the Archive chat list when they get a new message. Ignored if keep_unmuted_chats_archived == true
archiveChatListSettings archive_and_mute_new_chats_from_unknown_users:Bool keep_unmuted_chats_archived:Bool keep_chats_from_shareable_folders_archived:Bool = ArchiveChatListSettings;
//@keep_chats_from_folders_archived True, if unmuted chats, that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_unmuted_chats_archived == true
archiveChatListSettings archive_and_mute_new_chats_from_unknown_users:Bool keep_unmuted_chats_archived:Bool keep_chats_from_folders_archived:Bool = ArchiveChatListSettings;
//@class ChatList @description Describes a list of chats

View File

@ -80,7 +80,7 @@ GlobalPrivacySettings::GlobalPrivacySettings(td_api::object_ptr<td_api::archiveC
if (settings != nullptr) {
archive_and_mute_new_noncontact_peers_ = settings->archive_and_mute_new_chats_from_unknown_users_;
keep_archived_unmuted_ = settings->keep_unmuted_chats_archived_;
keep_archived_folders_ = settings->keep_chats_from_shareable_folders_archived_;
keep_archived_folders_ = settings->keep_chats_from_folders_archived_;
}
}

View File

@ -4957,12 +4957,11 @@ class CliClient final : public Actor {
} else if (op == "sacls") {
bool archive_and_mute_new_chats_from_unknown_users;
bool keep_unmuted_chats_archived;
bool keep_chats_from_shareable_folders_archived;
bool keep_chats_from_folders_archived;
get_args(args, archive_and_mute_new_chats_from_unknown_users, keep_unmuted_chats_archived,
keep_chats_from_shareable_folders_archived);
keep_chats_from_folders_archived);
auto settings = td_api::make_object<td_api::archiveChatListSettings>(
archive_and_mute_new_chats_from_unknown_users, keep_unmuted_chats_archived,
keep_chats_from_shareable_folders_archived);
archive_and_mute_new_chats_from_unknown_users, keep_unmuted_chats_archived, keep_chats_from_folders_archived);
send_request(td_api::make_object<td_api::setArchiveChatListSettings>(std::move(settings)));
} else if (op == "sct") {
ChatId chat_id;