mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Slightly improved filter for choosing users requested by bot.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user