mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Added ability to choose to show recent group history for each new user.
Fixed #9864.
This commit is contained in:
@@ -462,13 +462,14 @@ void ChatParticipants::requestCountDelayed(
|
||||
void ChatParticipants::add(
|
||||
not_null<PeerData*> peer,
|
||||
const std::vector<not_null<UserData*>> &users,
|
||||
bool passGroupHistory,
|
||||
Fn<void(bool)> done) {
|
||||
if (const auto chat = peer->asChat()) {
|
||||
for (const auto &user : users) {
|
||||
_api.request(MTPmessages_AddChatUser(
|
||||
chat->inputChat,
|
||||
user->inputUser,
|
||||
MTP_int(kForwardMessagesOnAdd)
|
||||
MTP_int(passGroupHistory ? kForwardMessagesOnAdd : 0)
|
||||
)).done([=](const MTPUpdates &result) {
|
||||
chat->session().api().applyUpdates(result);
|
||||
if (done) done(true);
|
||||
|
||||
Reference in New Issue
Block a user