mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Slightly improved filter for choosing users requested by bot.
This commit is contained in:
parent
a117c1ebf2
commit
ded7aada52
2 changed files with 7 additions and 5 deletions
|
@ -421,10 +421,10 @@ void ActivateBotCommand(ClickHandlerContext context, int row, int column) {
|
|||
MTP_int(itemId),
|
||||
MTP_int(id),
|
||||
MTP_vector_from_range(
|
||||
result
|
||||
| ranges::views::transform([](
|
||||
not_null<PeerData*> peer) {
|
||||
return MTPInputPeer(peer->input); }))
|
||||
result | ranges::views::transform([](
|
||||
not_null<PeerData*> peer) {
|
||||
return MTPInputPeer(peer->input);
|
||||
}))
|
||||
)).done([=](const MTPUpdates &result) {
|
||||
peer->session().api().applyUpdates(result);
|
||||
}).send();
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
void submit();
|
||||
|
||||
QString savedMessagesChatStatus() const override {
|
||||
return tr::lng_saved_forward_here(tr::now);
|
||||
return {};
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -295,6 +295,8 @@ object_ptr<Ui::BoxContent> CreatePeerByQueryBox(
|
|||
case Type::User: {
|
||||
const auto user = peer->asUser();
|
||||
return user
|
||||
&& !user->isInaccessible()
|
||||
&& !user->isNotificationsUser()
|
||||
&& checkRestriction(query.userIsBot, user->isBot())
|
||||
&& checkRestriction(query.userIsPremium, user->isPremium());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue