Fix sending first message in chat.

This commit is contained in:
John Preston 2019-09-06 14:14:04 +03:00
parent 8b766dda8e
commit ab6d9ff73c

View File

@ -2607,17 +2607,16 @@ void History::dialogEntryApplied() {
return;
}
if (!chatListMessage()) {
clear(ClearType::Unload);
addNewerSlice(QVector<MTPMessage>());
addOlderSlice(QVector<MTPMessage>());
if (const auto channel = peer->asChannel()) {
const auto inviter = channel->inviter;
if (inviter > 0 && channel->amIn()) {
if (const auto from = owner().userLoaded(inviter)) {
clear(ClearType::Unload);
addNewerSlice(QVector<MTPMessage>());
insertJoinedMessage();
}
}
} else {
clear(ClearType::DeleteChat);
}
return;
}