2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Track chat business bot state.

This commit is contained in:
John Preston
2024-03-17 13:17:34 +04:00
parent caa4c5428a
commit 3d97ea6f96
8 changed files with 106 additions and 65 deletions

View File

@@ -1584,9 +1584,9 @@ void PeerMenuBlockUserBox(
not_null<PeerData*> peer,
std::variant<v::null_t, bool> suggestReport,
std::variant<v::null_t, ClearChat, ClearReply> suggestClear) {
const auto settings = peer->settings().value_or(PeerSettings(0));
const auto settings = peer->barSettings().value_or(PeerBarSettings(0));
const auto reportNeeded = v::is_null(suggestReport)
? ((settings & PeerSetting::ReportSpam) != 0)
? ((settings & PeerBarSetting::ReportSpam) != 0)
: v::get<bool>(suggestReport);
const auto user = peer->asUser();