2
0
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:
John Preston
2015-12-06 18:50:02 +03:00
parent 93c29a1422
commit 128cbefe0c
15 changed files with 139 additions and 80 deletions

View File

@@ -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);
}
}