fix: make it build

This commit is contained in:
AlexeyZavar 2024-03-13 12:30:19 +03:00
parent 080400d7b8
commit 2be73d7924
2 changed files with 7 additions and 38 deletions

View file

@ -614,8 +614,6 @@ void GenerateItems(
not_null<History*> history,
EditedMessage message,
Fn<void(OwnedItem item, TimeId sentDate, MsgId)> callback) {
const auto session = &history->session();
const auto id = message.fakeId;
PeerData *from = history->owner().userLoaded(message.fromId);
if (!from) {
from = history->owner().channelLoaded(message.fromId);
@ -639,43 +637,14 @@ void GenerateItems(
const auto fromLink = from->createOpenLink();
const auto fromLinkText = Ui::Text::Link(fromName, QString());
const auto addSimpleServiceMessage = [&](
const TextWithEntities &text,
MsgId realId = MsgId(),
PhotoData *photo = nullptr)
{
auto message = PreparedServiceText{text};
message.links.push_back(fromLink);
addPart(
history->makeMessage(
history->nextNonHistoryEntryId(),
MessageFlag::AdminLogEntry,
date,
std::move(message),
peerToUser(from->id),
photo),
0,
realId);
};
const auto makeSimpleTextMessage = [&](TextWithEntities &&text)
{
const auto bodyFlags = MessageFlag::HasFromId | MessageFlag::Local;
const auto bodyReplyTo = FullReplyTo();
const auto bodyViaBotId = UserId();
const auto bodyGroupedId = uint64();
return history->makeMessage(
history->nextNonHistoryEntryId(),
bodyFlags,
bodyReplyTo,
bodyViaBotId,
date,
peerToUser(from->id),
QString(),
std::move(text),
MTP_messageMediaEmpty(),
HistoryMessageMarkupData(),
bodyGroupedId);
return history->makeMessage({
.id = history->nextNonHistoryEntryId(),
.flags = MessageFlag::HasFromId | MessageFlag::AdminLogEntry,
.from = from->id,
.date = date,
}, std::move(text), MTP_messageMediaEmpty());
};
const auto addSimpleTextMessage = [&](TextWithEntities &&text)

@ -1 +1 @@
Subproject commit 2d3938788255619ca885a3828dee75aa2d4dd04d
Subproject commit 4e082a4dbf86501a93346af4361472b286dd4bd5