From 83d0d18a5e9e236d9e2d9a2570d80ccab022fddb Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 11 Oct 2019 04:37:40 +0300 Subject: [PATCH] Delete unused default_can_report_spam_in_secret_chat. GitOrigin-RevId: 9b7f2f5f0185600c00756f2f2f4543496d5feca7 --- td/telegram/ContactsManager.cpp | 18 ------------------ td/telegram/ContactsManager.h | 2 -- 2 files changed, 20 deletions(-) diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 9da464fb..2af354a9 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -3492,24 +3492,6 @@ int32 ContactsManager::get_secret_chat_ttl(SecretChatId secret_chat_id) const { return c->ttl; } -bool ContactsManager::default_can_report_spam_in_secret_chat(SecretChatId secret_chat_id) const { - auto c = get_secret_chat(secret_chat_id); - if (c == nullptr) { - return true; - } - if (c->is_outbound) { - return false; - } - auto u = get_user(c->user_id); - if (u == nullptr) { - return true; - } - if (u->is_contact) { - return false; - } - return true; -} - string ContactsManager::get_user_username(UserId user_id) const { if (!user_id.is_valid()) { return string(); diff --git a/td/telegram/ContactsManager.h b/td/telegram/ContactsManager.h index f9fab375..62c58820 100644 --- a/td/telegram/ContactsManager.h +++ b/td/telegram/ContactsManager.h @@ -117,8 +117,6 @@ class ContactsManager : public Actor { SecretChatState get_secret_chat_state(SecretChatId secret_chat_id) const; int32 get_secret_chat_layer(SecretChatId secret_chat_id) const; - bool default_can_report_spam_in_secret_chat(SecretChatId secret_chat_id) const; - void on_imported_contacts(int64 random_id, vector imported_contact_user_ids, vector unimported_contact_invites);