mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 23:25:15 +00:00
improved langs for stickers, fixed confirmed actions from chats context menu, changed AppUserModelId for beta version
This commit is contained in:
@@ -971,11 +971,17 @@ void MainWidget::addParticipants(PeerData *chatOrChannel, const QVector<UserData
|
||||
}
|
||||
} else if (chatOrChannel->isChannel()) {
|
||||
QVector<MTPInputUser> inputUsers;
|
||||
inputUsers.reserve(users.size());
|
||||
inputUsers.reserve(qMin(users.size(), int(MaxUsersPerInvite)));
|
||||
for (QVector<UserData*>::const_iterator i = users.cbegin(), e = users.cend(); i != e; ++i) {
|
||||
inputUsers.push_back((*i)->inputUser);
|
||||
if (inputUsers.size() == MaxUsersPerInvite) {
|
||||
MTP::send(MTPchannels_InviteToChannel(chatOrChannel->asChannel()->inputChannel, MTP_vector<MTPInputUser>(inputUsers)), rpcDone(&MainWidget::inviteToChannelDone, chatOrChannel->asChannel()), rpcFail(&MainWidget::addParticipantsFail, chatOrChannel->asChannel()), 0, 5);
|
||||
inputUsers.clear();
|
||||
}
|
||||
}
|
||||
if (!inputUsers.isEmpty()) {
|
||||
MTP::send(MTPchannels_InviteToChannel(chatOrChannel->asChannel()->inputChannel, MTP_vector<MTPInputUser>(inputUsers)), rpcDone(&MainWidget::inviteToChannelDone, chatOrChannel->asChannel()), rpcFail(&MainWidget::addParticipantsFail, chatOrChannel->asChannel()), 0, 5);
|
||||
}
|
||||
MTP::send(MTPchannels_InviteToChannel(chatOrChannel->asChannel()->inputChannel, MTP_vector<MTPInputUser>(inputUsers)), rpcDone(&MainWidget::inviteToChannelDone, chatOrChannel->asChannel()), rpcFail(&MainWidget::addParticipantsFail, chatOrChannel->asChannel()), 0, 5);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user