2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Allow saving "Autotranslation of Messages" in channels.

This commit is contained in:
John Preston
2025-04-24 13:54:07 +04:00
parent 8d734f5cc4
commit eb81c33308
13 changed files with 174 additions and 5 deletions

View File

@@ -967,7 +967,8 @@ not_null<PeerData*> Session::processChat(const MTPChat &data) {
| Flag::Forum
| ((!minimal && !data.is_stories_hidden_min())
? Flag::StoriesHidden
: Flag());
: Flag())
| Flag::AutoTranslation;
const auto storiesState = minimal
? std::optional<Data::Stories::PeerSourceState>()
: data.is_stories_unavailable()
@@ -1006,7 +1007,8 @@ not_null<PeerData*> Session::processChat(const MTPChat &data) {
&& !data.is_stories_hidden_min()
&& data.is_stories_hidden())
? Flag::StoriesHidden
: Flag());
: Flag())
| (data.is_autotranslation() ? Flag::AutoTranslation : Flag());
channel->setFlags((channel->flags() & ~flagsMask) | flagsSet);
channel->setBotVerifyDetailsIcon(
data.vbot_verification_icon().value_or_empty());