Store DialogIds in UserPrivacySettingRule.
This commit is contained in:
parent
51547fba0e
commit
5ee4070d4e
@ -9,7 +9,6 @@
|
|||||||
#include "td/telegram/ChannelId.h"
|
#include "td/telegram/ChannelId.h"
|
||||||
#include "td/telegram/ChatId.h"
|
#include "td/telegram/ChatId.h"
|
||||||
#include "td/telegram/ContactsManager.h"
|
#include "td/telegram/ContactsManager.h"
|
||||||
#include "td/telegram/DialogId.h"
|
|
||||||
#include "td/telegram/MessagesManager.h"
|
#include "td/telegram/MessagesManager.h"
|
||||||
#include "td/telegram/Td.h"
|
#include "td/telegram/Td.h"
|
||||||
|
|
||||||
@ -20,30 +19,30 @@
|
|||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
void UserPrivacySettingRule::set_chat_ids(Td *td, const vector<int64> &dialog_ids) {
|
void UserPrivacySettingRule::set_dialog_ids(Td *td, const vector<int64> &chat_ids) {
|
||||||
chat_ids_.clear();
|
dialog_ids_.clear();
|
||||||
for (auto dialog_id_int : dialog_ids) {
|
for (auto chat_id : chat_ids) {
|
||||||
DialogId dialog_id(dialog_id_int);
|
DialogId dialog_id(chat_id);
|
||||||
if (!td->messages_manager_->have_dialog_force(dialog_id, "UserPrivacySettingRule::set_chat_ids")) {
|
if (!td->messages_manager_->have_dialog_force(dialog_id, "UserPrivacySettingRule::set_dialog_ids")) {
|
||||||
LOG(ERROR) << "Ignore not found " << dialog_id;
|
LOG(INFO) << "Ignore not found " << dialog_id;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (dialog_id.get_type()) {
|
switch (dialog_id.get_type()) {
|
||||||
case DialogType::Chat:
|
case DialogType::Chat:
|
||||||
chat_ids_.push_back(dialog_id.get_chat_id().get());
|
dialog_ids_.push_back(dialog_id);
|
||||||
break;
|
break;
|
||||||
case DialogType::Channel: {
|
case DialogType::Channel: {
|
||||||
auto channel_id = dialog_id.get_channel_id();
|
auto channel_id = dialog_id.get_channel_id();
|
||||||
if (!td->contacts_manager_->is_megagroup_channel(channel_id)) {
|
if (!td->contacts_manager_->is_megagroup_channel(channel_id)) {
|
||||||
LOG(ERROR) << "Ignore broadcast " << channel_id;
|
LOG(INFO) << "Ignore broadcast " << channel_id;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
chat_ids_.push_back(channel_id.get());
|
dialog_ids_.push_back(dialog_id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
LOG(ERROR) << "Ignore " << dialog_id;
|
LOG(INFO) << "Ignore " << dialog_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -65,7 +64,7 @@ UserPrivacySettingRule::UserPrivacySettingRule(Td *td, const td_api::UserPrivacy
|
|||||||
break;
|
break;
|
||||||
case td_api::userPrivacySettingRuleAllowChatMembers::ID:
|
case td_api::userPrivacySettingRuleAllowChatMembers::ID:
|
||||||
type_ = Type::AllowChatParticipants;
|
type_ = Type::AllowChatParticipants;
|
||||||
set_chat_ids(td, static_cast<const td_api::userPrivacySettingRuleAllowChatMembers &>(rule).chat_ids_);
|
set_dialog_ids(td, static_cast<const td_api::userPrivacySettingRuleAllowChatMembers &>(rule).chat_ids_);
|
||||||
break;
|
break;
|
||||||
case td_api::userPrivacySettingRuleRestrictContacts::ID:
|
case td_api::userPrivacySettingRuleRestrictContacts::ID:
|
||||||
type_ = Type::RestrictContacts;
|
type_ = Type::RestrictContacts;
|
||||||
@ -80,16 +79,17 @@ UserPrivacySettingRule::UserPrivacySettingRule(Td *td, const td_api::UserPrivacy
|
|||||||
break;
|
break;
|
||||||
case td_api::userPrivacySettingRuleRestrictChatMembers::ID:
|
case td_api::userPrivacySettingRuleRestrictChatMembers::ID:
|
||||||
type_ = Type::RestrictChatParticipants;
|
type_ = Type::RestrictChatParticipants;
|
||||||
set_chat_ids(td, static_cast<const td_api::userPrivacySettingRuleRestrictChatMembers &>(rule).chat_ids_);
|
set_dialog_ids(td, static_cast<const td_api::userPrivacySettingRuleRestrictChatMembers &>(rule).chat_ids_);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
td::remove_if(user_ids_, [](UserId user_id) { return !user_id.is_valid(); });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UserPrivacySettingRule::UserPrivacySettingRule(const telegram_api::PrivacyRule &rule) {
|
UserPrivacySettingRule::UserPrivacySettingRule(Td *td,
|
||||||
switch (rule.get_id()) {
|
const telegram_api::object_ptr<telegram_api::PrivacyRule> &rule) {
|
||||||
|
CHECK(rule != nullptr);
|
||||||
|
switch (rule->get_id()) {
|
||||||
case telegram_api::privacyValueAllowContacts::ID:
|
case telegram_api::privacyValueAllowContacts::ID:
|
||||||
type_ = Type::AllowContacts;
|
type_ = Type::AllowContacts;
|
||||||
break;
|
break;
|
||||||
@ -101,11 +101,12 @@ UserPrivacySettingRule::UserPrivacySettingRule(const telegram_api::PrivacyRule &
|
|||||||
break;
|
break;
|
||||||
case telegram_api::privacyValueAllowUsers::ID:
|
case telegram_api::privacyValueAllowUsers::ID:
|
||||||
type_ = Type::AllowUsers;
|
type_ = Type::AllowUsers;
|
||||||
user_ids_ = UserId::get_user_ids(static_cast<const telegram_api::privacyValueAllowUsers &>(rule).users_);
|
user_ids_ = UserId::get_user_ids(static_cast<const telegram_api::privacyValueAllowUsers &>(*rule).users_);
|
||||||
break;
|
break;
|
||||||
case telegram_api::privacyValueAllowChatParticipants::ID:
|
case telegram_api::privacyValueAllowChatParticipants::ID:
|
||||||
type_ = Type::AllowChatParticipants;
|
type_ = Type::AllowChatParticipants;
|
||||||
chat_ids_ = static_cast<const telegram_api::privacyValueAllowChatParticipants &>(rule).chats_;
|
set_dialog_ids_from_server(td,
|
||||||
|
static_cast<const telegram_api::privacyValueAllowChatParticipants &>(*rule).chats_);
|
||||||
break;
|
break;
|
||||||
case telegram_api::privacyValueDisallowContacts::ID:
|
case telegram_api::privacyValueDisallowContacts::ID:
|
||||||
type_ = Type::RestrictContacts;
|
type_ = Type::RestrictContacts;
|
||||||
@ -115,15 +116,41 @@ UserPrivacySettingRule::UserPrivacySettingRule(const telegram_api::PrivacyRule &
|
|||||||
break;
|
break;
|
||||||
case telegram_api::privacyValueDisallowUsers::ID:
|
case telegram_api::privacyValueDisallowUsers::ID:
|
||||||
type_ = Type::RestrictUsers;
|
type_ = Type::RestrictUsers;
|
||||||
user_ids_ = UserId::get_user_ids(static_cast<const telegram_api::privacyValueDisallowUsers &>(rule).users_);
|
user_ids_ = UserId::get_user_ids(static_cast<const telegram_api::privacyValueDisallowUsers &>(*rule).users_);
|
||||||
break;
|
break;
|
||||||
case telegram_api::privacyValueDisallowChatParticipants::ID:
|
case telegram_api::privacyValueDisallowChatParticipants::ID:
|
||||||
type_ = Type::RestrictChatParticipants;
|
type_ = Type::RestrictChatParticipants;
|
||||||
chat_ids_ = static_cast<const telegram_api::privacyValueDisallowChatParticipants &>(rule).chats_;
|
set_dialog_ids_from_server(td,
|
||||||
|
static_cast<const telegram_api::privacyValueDisallowChatParticipants &>(*rule).chats_);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
td::remove_if(user_ids_, [td](UserId user_id) {
|
||||||
|
if (!td->contacts_manager_->have_user(user_id)) {
|
||||||
|
LOG(ERROR) << "Receive unknown " << user_id;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void UserPrivacySettingRule::set_dialog_ids_from_server(Td *td, const vector<int64> &server_chat_ids) {
|
||||||
|
dialog_ids_.clear();
|
||||||
|
for (auto server_chat_id : server_chat_ids) {
|
||||||
|
ChatId chat_id(server_chat_id);
|
||||||
|
DialogId dialog_id(chat_id);
|
||||||
|
if (!td->contacts_manager_->have_chat(chat_id)) {
|
||||||
|
ChannelId channel_id(server_chat_id);
|
||||||
|
dialog_id = DialogId(channel_id);
|
||||||
|
if (!td->contacts_manager_->have_channel(channel_id)) {
|
||||||
|
LOG(ERROR) << "Receive unknown group " << server_chat_id << " from the server";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
td->messages_manager_->force_create_dialog(dialog_id, "set_dialog_ids_from_server");
|
||||||
|
dialog_ids_.push_back(dialog_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
td_api::object_ptr<td_api::UserPrivacySettingRule> UserPrivacySettingRule::get_user_privacy_setting_rule_object(
|
td_api::object_ptr<td_api::UserPrivacySettingRule> UserPrivacySettingRule::get_user_privacy_setting_rule_object(
|
||||||
@ -139,7 +166,8 @@ td_api::object_ptr<td_api::UserPrivacySettingRule> UserPrivacySettingRule::get_u
|
|||||||
return make_tl_object<td_api::userPrivacySettingRuleAllowUsers>(
|
return make_tl_object<td_api::userPrivacySettingRuleAllowUsers>(
|
||||||
td->contacts_manager_->get_user_ids_object(user_ids_, "userPrivacySettingRuleAllowUsers"));
|
td->contacts_manager_->get_user_ids_object(user_ids_, "userPrivacySettingRuleAllowUsers"));
|
||||||
case Type::AllowChatParticipants:
|
case Type::AllowChatParticipants:
|
||||||
return make_tl_object<td_api::userPrivacySettingRuleAllowChatMembers>(chat_ids_as_dialog_ids(td));
|
return make_tl_object<td_api::userPrivacySettingRuleAllowChatMembers>(
|
||||||
|
td->messages_manager_->get_chat_ids_object(dialog_ids_, "UserPrivacySettingRule"));
|
||||||
case Type::RestrictContacts:
|
case Type::RestrictContacts:
|
||||||
return make_tl_object<td_api::userPrivacySettingRuleRestrictContacts>();
|
return make_tl_object<td_api::userPrivacySettingRuleRestrictContacts>();
|
||||||
case Type::RestrictAll:
|
case Type::RestrictAll:
|
||||||
@ -148,9 +176,11 @@ td_api::object_ptr<td_api::UserPrivacySettingRule> UserPrivacySettingRule::get_u
|
|||||||
return make_tl_object<td_api::userPrivacySettingRuleRestrictUsers>(
|
return make_tl_object<td_api::userPrivacySettingRuleRestrictUsers>(
|
||||||
td->contacts_manager_->get_user_ids_object(user_ids_, "userPrivacySettingRuleRestrictUsers"));
|
td->contacts_manager_->get_user_ids_object(user_ids_, "userPrivacySettingRuleRestrictUsers"));
|
||||||
case Type::RestrictChatParticipants:
|
case Type::RestrictChatParticipants:
|
||||||
return make_tl_object<td_api::userPrivacySettingRuleRestrictChatMembers>(chat_ids_as_dialog_ids(td));
|
return make_tl_object<td_api::userPrivacySettingRuleRestrictChatMembers>(
|
||||||
|
td->messages_manager_->get_chat_ids_object(dialog_ids_, "UserPrivacySettingRule"));
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +195,7 @@ telegram_api::object_ptr<telegram_api::InputPrivacyRule> UserPrivacySettingRule:
|
|||||||
case Type::AllowUsers:
|
case Type::AllowUsers:
|
||||||
return make_tl_object<telegram_api::inputPrivacyValueAllowUsers>(get_input_users(td));
|
return make_tl_object<telegram_api::inputPrivacyValueAllowUsers>(get_input_users(td));
|
||||||
case Type::AllowChatParticipants:
|
case Type::AllowChatParticipants:
|
||||||
return make_tl_object<telegram_api::inputPrivacyValueAllowChatParticipants>(vector<int64>{chat_ids_});
|
return make_tl_object<telegram_api::inputPrivacyValueAllowChatParticipants>(get_input_chat_ids(td));
|
||||||
case Type::RestrictContacts:
|
case Type::RestrictContacts:
|
||||||
return make_tl_object<telegram_api::inputPrivacyValueDisallowContacts>();
|
return make_tl_object<telegram_api::inputPrivacyValueDisallowContacts>();
|
||||||
case Type::RestrictAll:
|
case Type::RestrictAll:
|
||||||
@ -173,40 +203,12 @@ telegram_api::object_ptr<telegram_api::InputPrivacyRule> UserPrivacySettingRule:
|
|||||||
case Type::RestrictUsers:
|
case Type::RestrictUsers:
|
||||||
return make_tl_object<telegram_api::inputPrivacyValueDisallowUsers>(get_input_users(td));
|
return make_tl_object<telegram_api::inputPrivacyValueDisallowUsers>(get_input_users(td));
|
||||||
case Type::RestrictChatParticipants:
|
case Type::RestrictChatParticipants:
|
||||||
return make_tl_object<telegram_api::inputPrivacyValueDisallowChatParticipants>(vector<int64>{chat_ids_});
|
return make_tl_object<telegram_api::inputPrivacyValueDisallowChatParticipants>(get_input_chat_ids(td));
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UserPrivacySettingRule UserPrivacySettingRule::get_user_privacy_setting_rule(
|
|
||||||
Td *td, telegram_api::object_ptr<telegram_api::PrivacyRule> rule) {
|
|
||||||
CHECK(rule != nullptr);
|
|
||||||
UserPrivacySettingRule result(*rule);
|
|
||||||
td::remove_if(result.user_ids_, [td](UserId user_id) {
|
|
||||||
if (!td->contacts_manager_->have_user(user_id)) {
|
|
||||||
LOG(ERROR) << "Receive unknown " << user_id << " from the server";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
td::remove_if(result.chat_ids_, [td](int64 chat_id_int) {
|
|
||||||
ChatId chat_id(chat_id_int);
|
|
||||||
DialogId dialog_id(chat_id);
|
|
||||||
if (!td->contacts_manager_->have_chat(chat_id)) {
|
|
||||||
ChannelId channel_id(chat_id_int);
|
|
||||||
dialog_id = DialogId(channel_id);
|
|
||||||
if (!td->contacts_manager_->have_channel(channel_id)) {
|
|
||||||
LOG(ERROR) << "Receive unknown group " << channel_id << " from the server";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
td->messages_manager_->force_create_dialog(dialog_id, "UserPrivacySettingRule");
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
vector<telegram_api::object_ptr<telegram_api::InputUser>> UserPrivacySettingRule::get_input_users(Td *td) const {
|
vector<telegram_api::object_ptr<telegram_api::InputUser>> UserPrivacySettingRule::get_input_users(Td *td) const {
|
||||||
vector<telegram_api::object_ptr<telegram_api::InputUser>> result;
|
vector<telegram_api::object_ptr<telegram_api::InputUser>> result;
|
||||||
for (auto user_id : user_ids_) {
|
for (auto user_id : user_ids_) {
|
||||||
@ -214,24 +216,25 @@ vector<telegram_api::object_ptr<telegram_api::InputUser>> UserPrivacySettingRule
|
|||||||
if (r_input_user.is_ok()) {
|
if (r_input_user.is_ok()) {
|
||||||
result.push_back(r_input_user.move_as_ok());
|
result.push_back(r_input_user.move_as_ok());
|
||||||
} else {
|
} else {
|
||||||
LOG(ERROR) << "Have no access to " << user_id;
|
LOG(INFO) << "Have no access to " << user_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<int64> UserPrivacySettingRule::chat_ids_as_dialog_ids(Td *td) const {
|
vector<int64> UserPrivacySettingRule::get_input_chat_ids(Td *td) const {
|
||||||
vector<int64> result;
|
vector<int64> result;
|
||||||
for (auto chat_id_int : chat_ids_) {
|
for (auto dialog_id : dialog_ids_) {
|
||||||
ChatId chat_id(chat_id_int);
|
switch (dialog_id.get_type()) {
|
||||||
DialogId dialog_id(chat_id);
|
case DialogType::Chat:
|
||||||
if (!td->contacts_manager_->have_chat(chat_id)) {
|
result.push_back(dialog_id.get_chat_id().get());
|
||||||
ChannelId channel_id(chat_id_int);
|
break;
|
||||||
dialog_id = DialogId(channel_id);
|
case DialogType::Channel:
|
||||||
CHECK(td->contacts_manager_->have_channel(channel_id));
|
result.push_back(dialog_id.get_channel_id().get());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
CHECK(td->messages_manager_->have_dialog(dialog_id));
|
|
||||||
result.push_back(td->messages_manager_->get_chat_id_object(dialog_id, "UserPrivacySettingRule"));
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -254,7 +257,7 @@ UserPrivacySettingRules UserPrivacySettingRules::get_user_privacy_setting_rules(
|
|||||||
Td *td, vector<telegram_api::object_ptr<telegram_api::PrivacyRule>> rules) {
|
Td *td, vector<telegram_api::object_ptr<telegram_api::PrivacyRule>> rules) {
|
||||||
UserPrivacySettingRules result;
|
UserPrivacySettingRules result;
|
||||||
for (auto &rule : rules) {
|
for (auto &rule : rules) {
|
||||||
result.rules_.push_back(UserPrivacySettingRule::get_user_privacy_setting_rule(td, std::move(rule)));
|
result.rules_.push_back(UserPrivacySettingRule(td, std::move(rule)));
|
||||||
}
|
}
|
||||||
if (!result.rules_.empty() && result.rules_.back().get_user_privacy_setting_rule_object(td)->get_id() ==
|
if (!result.rules_.empty() && result.rules_.back().get_user_privacy_setting_rule_object(td)->get_id() ==
|
||||||
td_api::userPrivacySettingRuleRestrictAll::ID) {
|
td_api::userPrivacySettingRuleRestrictAll::ID) {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "td/telegram/DialogId.h"
|
||||||
#include "td/telegram/td_api.h"
|
#include "td/telegram/td_api.h"
|
||||||
#include "td/telegram/telegram_api.h"
|
#include "td/telegram/telegram_api.h"
|
||||||
#include "td/telegram/UserId.h"
|
#include "td/telegram/UserId.h"
|
||||||
@ -24,15 +25,14 @@ class UserPrivacySettingRule {
|
|||||||
|
|
||||||
UserPrivacySettingRule(Td *td, const td_api::UserPrivacySettingRule &rule);
|
UserPrivacySettingRule(Td *td, const td_api::UserPrivacySettingRule &rule);
|
||||||
|
|
||||||
static UserPrivacySettingRule get_user_privacy_setting_rule(Td *td,
|
UserPrivacySettingRule(Td *td, const telegram_api::object_ptr<telegram_api::PrivacyRule> &rule);
|
||||||
telegram_api::object_ptr<telegram_api::PrivacyRule> rule);
|
|
||||||
|
|
||||||
td_api::object_ptr<td_api::UserPrivacySettingRule> get_user_privacy_setting_rule_object(Td *td) const;
|
td_api::object_ptr<td_api::UserPrivacySettingRule> get_user_privacy_setting_rule_object(Td *td) const;
|
||||||
|
|
||||||
telegram_api::object_ptr<telegram_api::InputPrivacyRule> get_input_privacy_rule(Td *td) const;
|
telegram_api::object_ptr<telegram_api::InputPrivacyRule> get_input_privacy_rule(Td *td) const;
|
||||||
|
|
||||||
bool operator==(const UserPrivacySettingRule &other) const {
|
bool operator==(const UserPrivacySettingRule &other) const {
|
||||||
return type_ == other.type_ && user_ids_ == other.user_ids_ && chat_ids_ == other.chat_ids_;
|
return type_ == other.type_ && user_ids_ == other.user_ids_ && dialog_ids_ == other.dialog_ids_;
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<UserId> get_restricted_user_ids() const;
|
vector<UserId> get_restricted_user_ids() const;
|
||||||
@ -44,7 +44,7 @@ class UserPrivacySettingRule {
|
|||||||
td::store(user_ids_, storer);
|
td::store(user_ids_, storer);
|
||||||
}
|
}
|
||||||
if (type_ == Type::AllowChatParticipants || type_ == Type::RestrictChatParticipants) {
|
if (type_ == Type::AllowChatParticipants || type_ == Type::RestrictChatParticipants) {
|
||||||
td::store(chat_ids_, storer);
|
td::store(dialog_ids_, storer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ class UserPrivacySettingRule {
|
|||||||
td::parse(user_ids_, parser);
|
td::parse(user_ids_, parser);
|
||||||
}
|
}
|
||||||
if (type_ == Type::AllowChatParticipants || type_ == Type::RestrictChatParticipants) {
|
if (type_ == Type::AllowChatParticipants || type_ == Type::RestrictChatParticipants) {
|
||||||
td::parse(chat_ids_, parser);
|
td::parse(dialog_ids_, parser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,15 +73,15 @@ class UserPrivacySettingRule {
|
|||||||
} type_ = Type::RestrictAll;
|
} type_ = Type::RestrictAll;
|
||||||
|
|
||||||
vector<UserId> user_ids_;
|
vector<UserId> user_ids_;
|
||||||
vector<int64> chat_ids_;
|
vector<DialogId> dialog_ids_;
|
||||||
|
|
||||||
vector<telegram_api::object_ptr<telegram_api::InputUser>> get_input_users(Td *td) const;
|
vector<telegram_api::object_ptr<telegram_api::InputUser>> get_input_users(Td *td) const;
|
||||||
|
|
||||||
void set_chat_ids(Td *td, const vector<int64> &dialog_ids);
|
vector<int64> get_input_chat_ids(Td *td) const;
|
||||||
|
|
||||||
vector<int64> chat_ids_as_dialog_ids(Td *td) const;
|
void set_dialog_ids(Td *td, const vector<int64> &chat_ids);
|
||||||
|
|
||||||
explicit UserPrivacySettingRule(const telegram_api::PrivacyRule &rule);
|
void set_dialog_ids_from_server(Td *td, const vector<int64> &chat_ids);
|
||||||
};
|
};
|
||||||
|
|
||||||
class UserPrivacySettingRules {
|
class UserPrivacySettingRules {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user