mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Don't use MTP* for PeerSettings flags.
This commit is contained in:
@@ -834,10 +834,9 @@ void PeerMenuBlockUserBox(
|
||||
not_null<PeerData*> peer,
|
||||
std::variant<v::null_t, bool> suggestReport,
|
||||
std::variant<v::null_t, ClearChat, ClearReply> suggestClear) {
|
||||
using Flag = MTPDpeerSettings::Flag;
|
||||
const auto settings = peer->settings().value_or(Flag(0));
|
||||
const auto settings = peer->settings().value_or(PeerSettings(0));
|
||||
const auto reportNeeded = v::is_null(suggestReport)
|
||||
? ((settings & Flag::f_report_spam) != 0)
|
||||
? ((settings & PeerSetting::ReportSpam) != 0)
|
||||
: v::get<bool>(suggestReport);
|
||||
|
||||
const auto user = peer->asUser();
|
||||
|
Reference in New Issue
Block a user