diff --git a/Telegram/SourceFiles/info/profile/info_profile_values.cpp b/Telegram/SourceFiles/info/profile/info_profile_values.cpp index 31423357f9..423eb09a0e 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_values.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_values.cpp @@ -80,29 +80,36 @@ rpl::producer UsernameValue( | WithEmptyEntities(); } -rpl::producer AboutValue( +rpl::producer PlainAboutValue( not_null peer) { if (auto channel = peer->asChannel()) { return Notify::PeerUpdateValue( channel, Notify::PeerUpdate::Flag::AboutChanged) - | rpl::map([channel] { return channel->about(); }) - | WithEmptyEntities(); + | rpl::map([channel] { return channel->about(); }); } else if (auto user = peer->asUser()) { if (user->botInfo) { - return PlainBioValue(user) - | WithEmptyEntities() - | rpl::map([](TextWithEntities &&text) { - auto flags = TextParseLinks - | TextParseMentions - | TextParseHashtags - | TextParseBotCommands; - TextUtilities::ParseEntities(text, flags); - return std::move(text); - }); + return PlainBioValue(user); } } - return rpl::single(TextWithEntities{}); + return rpl::single(QString()); +} + + +rpl::producer AboutValue( + not_null peer) { + auto flags = TextParseLinks + | TextParseMentions + | TextParseHashtags; + if (peer->isUser()) { + flags |= TextParseBotCommands; + } + return PlainAboutValue(peer) + | WithEmptyEntities() + | rpl::map([=](TextWithEntities &&text) { + TextUtilities::ParseEntities(text, flags); + return std::move(text); + }); } rpl::producer LinkValue(