mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 23:45:44 +00:00
Support business bot state in chat.
This commit is contained in:
@@ -608,6 +608,23 @@ void PeerData::checkFolder(FolderId folderId) {
|
||||
}
|
||||
}
|
||||
|
||||
void PeerData::clearBusinessBot() {
|
||||
if (const auto details = _barDetails.get()) {
|
||||
if (details->requestChatDate) {
|
||||
details->businessBot = nullptr;
|
||||
details->businessBotManageUrl = QString();
|
||||
} else {
|
||||
_barDetails = nullptr;
|
||||
}
|
||||
}
|
||||
if (const auto settings = barSettings()) {
|
||||
setBarSettings(*settings
|
||||
& ~PeerBarSetting::BusinessBotPaused
|
||||
& ~PeerBarSetting::BusinessBotCanReply
|
||||
& ~PeerBarSetting::HasBusinessBot);
|
||||
}
|
||||
}
|
||||
|
||||
void PeerData::setTranslationDisabled(bool disabled) {
|
||||
const auto flag = disabled
|
||||
? TranslationFlag::Disabled
|
||||
|
Reference in New Issue
Block a user