mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
fix: make it build
This commit is contained in:
parent
080400d7b8
commit
2be73d7924
2 changed files with 7 additions and 38 deletions
|
@ -614,8 +614,6 @@ void GenerateItems(
|
||||||
not_null<History*> history,
|
not_null<History*> history,
|
||||||
EditedMessage message,
|
EditedMessage message,
|
||||||
Fn<void(OwnedItem item, TimeId sentDate, MsgId)> callback) {
|
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);
|
PeerData *from = history->owner().userLoaded(message.fromId);
|
||||||
if (!from) {
|
if (!from) {
|
||||||
from = history->owner().channelLoaded(message.fromId);
|
from = history->owner().channelLoaded(message.fromId);
|
||||||
|
@ -639,43 +637,14 @@ void GenerateItems(
|
||||||
const auto fromLink = from->createOpenLink();
|
const auto fromLink = from->createOpenLink();
|
||||||
const auto fromLinkText = Ui::Text::Link(fromName, QString());
|
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 makeSimpleTextMessage = [&](TextWithEntities &&text)
|
||||||
{
|
{
|
||||||
const auto bodyFlags = MessageFlag::HasFromId | MessageFlag::Local;
|
return history->makeMessage({
|
||||||
const auto bodyReplyTo = FullReplyTo();
|
.id = history->nextNonHistoryEntryId(),
|
||||||
const auto bodyViaBotId = UserId();
|
.flags = MessageFlag::HasFromId | MessageFlag::AdminLogEntry,
|
||||||
const auto bodyGroupedId = uint64();
|
.from = from->id,
|
||||||
return history->makeMessage(
|
.date = date,
|
||||||
history->nextNonHistoryEntryId(),
|
}, std::move(text), MTP_messageMediaEmpty());
|
||||||
bodyFlags,
|
|
||||||
bodyReplyTo,
|
|
||||||
bodyViaBotId,
|
|
||||||
date,
|
|
||||||
peerToUser(from->id),
|
|
||||||
QString(),
|
|
||||||
std::move(text),
|
|
||||||
MTP_messageMediaEmpty(),
|
|
||||||
HistoryMessageMarkupData(),
|
|
||||||
bodyGroupedId);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto addSimpleTextMessage = [&](TextWithEntities &&text)
|
const auto addSimpleTextMessage = [&](TextWithEntities &&text)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2d3938788255619ca885a3828dee75aa2d4dd04d
|
Subproject commit 4e082a4dbf86501a93346af4361472b286dd4bd5
|
Loading…
Add table
Reference in a new issue