Skip to content

Commit

Permalink
f Rebase & Update TDLib to 1.8.11 & Fix the build.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Sep 11, 2024
1 parent 77844a7 commit 9b29d8c
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Telegram/SourceFiles/api/api_bot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,20 +450,26 @@ void ActivateBotCommand(ClickHandlerContext context, int row, int column) {
const auto itemId = item->id;
const auto id = int32(button->buttonId);
const auto chosen = [=](std::vector<not_null<PeerData*>> result) {
if (const auto user = result->asUser()) {
peer->session().sender().request(TLshareUserWithBot(
if (query.type == RequestPeerQuery::Type::User) {
auto ids = QVector<TLint53>();
for (const auto &peer : result) {
if (const auto user = peer->asUser()) {
ids.push_back(tl_int53(peerToUser(user->id).bare));
}
}
peer->session().sender().request(TLshareUsersWithBot(
peerToTdbChat(peer->id),
tl_int53(itemId.bare),
tl_int32(id),
tl_int53(peerToUser(user->id).bare),
tl_vector<TLint53>(ids),
tl_bool(false)
)).send();
} else {
} else if (!result.empty()) {
peer->session().sender().request(TLshareChatWithBot(
peerToTdbChat(peer->id),
tl_int53(itemId.bare),
tl_int32(id),
peerToTdbChat(result->id),
peerToTdbChat(result.front()->id),
tl_bool(false)
)).send();
}
Expand Down

0 comments on commit 9b29d8c

Please sign in to comment.