Add DialogParticipantFilter logging.
This commit is contained in:
parent
db77165dad
commit
52b7f8f118
@ -810,6 +810,28 @@ StringBuilder &operator<<(StringBuilder &string_builder, const ChannelParticipan
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder &operator<<(StringBuilder &string_builder, const DialogParticipantsFilter &filter) {
|
||||
switch (filter.type) {
|
||||
case DialogParticipantsFilter::Type::Contacts:
|
||||
return string_builder << "Contacts";
|
||||
case DialogParticipantsFilter::Type::Administrators:
|
||||
return string_builder << "Administrators";
|
||||
case DialogParticipantsFilter::Type::Members:
|
||||
return string_builder << "Members";
|
||||
case DialogParticipantsFilter::Type::Restricted:
|
||||
return string_builder << "Restricted";
|
||||
case DialogParticipantsFilter::Type::Banned:
|
||||
return string_builder << "Banned";
|
||||
case DialogParticipantsFilter::Type::Mention:
|
||||
return string_builder << "Mention";
|
||||
case DialogParticipantsFilter::Type::Bots:
|
||||
return string_builder << "Bots";
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return string_builder;
|
||||
}
|
||||
}
|
||||
|
||||
DialogParticipantsFilter get_dialog_participants_filter(const tl_object_ptr<td_api::ChatMembersFilter> &filter) {
|
||||
if (filter == nullptr) {
|
||||
return DialogParticipantsFilter{DialogParticipantsFilter::Type::Members};
|
||||
|
@ -463,6 +463,8 @@ class DialogParticipantsFilter {
|
||||
}
|
||||
};
|
||||
|
||||
StringBuilder &operator<<(StringBuilder &string_builder, const DialogParticipantsFilter &filter);
|
||||
|
||||
DialogParticipantsFilter get_dialog_participants_filter(const tl_object_ptr<td_api::ChatMembersFilter> &filter);
|
||||
|
||||
DialogParticipantStatus get_dialog_participant_status(const tl_object_ptr<td_api::ChatMemberStatus> &status);
|
||||
|
@ -1539,7 +1539,8 @@ void GroupCallManager::finish_load_group_call_administrators(InputGroupCallId in
|
||||
}
|
||||
|
||||
auto *group_call_participants = add_group_call_participants(input_group_call_id);
|
||||
if (group_call_participants->administrator_user_ids == administrator_user_ids) {
|
||||
if (group_call_participants->are_administrators_loaded &&
|
||||
group_call_participants->administrator_user_ids == administrator_user_ids) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -30246,7 +30246,8 @@ std::pair<int32, vector<DialogParticipant>> MessagesManager::search_private_chat
|
||||
std::pair<int32, vector<DialogParticipant>> MessagesManager::search_dialog_participants(
|
||||
DialogId dialog_id, const string &query, int32 limit, DialogParticipantsFilter filter, int64 &random_id,
|
||||
bool without_bot_info, bool force, Promise<Unit> &&promise) {
|
||||
LOG(INFO) << "Receive searchChatMembers request to search for " << query << " in " << dialog_id;
|
||||
LOG(INFO) << "Receive searchChatMembers request to search for \"" << query << "\" in " << dialog_id << " with filter "
|
||||
<< filter;
|
||||
if (!have_dialog_force(dialog_id)) {
|
||||
promise.set_error(Status::Error(3, "Chat not found"));
|
||||
return {};
|
||||
|
Loading…
Reference in New Issue
Block a user