rpl::producer<bool> VerifiedValue( not_null<PeerData*> peer) { if (auto user = peer->asUser()) { return Data::PeerFlagValue(user, MTPDuser::Flag::f_verified); } else if (auto channel = peer->asChannel()) { return Data::PeerFlagValue( channel, MTPDchannel::Flag::f_verified); } return rpl::single(false); }
rpl::producer<QString> PlainAboutValue( not_null<PeerData*> peer) { if (auto channel = peer->asChannel()) { return Notify::PeerUpdateValue( channel, Notify::PeerUpdate::Flag::AboutChanged ) | rpl::map([channel] { return channel->about(); }); } else if (auto user = peer->asUser()) { if (user->botInfo) { return PlainBioValue(user); } } return rpl::single(QString()); }