2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Update API scheme to layer 198.

This commit is contained in:
John Preston
2025-01-09 11:24:54 +04:00
parent 37d32b32f8
commit d0132c0f7b
25 changed files with 251 additions and 114 deletions

View File

@@ -283,6 +283,7 @@ mtpRequestId EditTextMessage(
return MTP_inputMediaDocument(
MTP_flags(flags),
document->mtpInput(),
MTPInputPhoto(), // video_cover
MTP_int(media->ttlSeconds()),
MTPstring()); // query
};

View File

@@ -121,6 +121,7 @@ MTPInputMedia PrepareUploadedDocument(
ComposeSendingDocumentAttributes(document),
MTP_vector<MTPInputDocument>(
ranges::to<QVector<MTPInputDocument>>(info.attachedStickers)),
MTPInputPhoto(), // video_cover
MTP_int(ttlSeconds));
}

View File

@@ -272,6 +272,7 @@ void SendExistingDocument(
return MTP_inputMediaDocument(
MTP_flags(0),
document->mtpInput(),
MTPInputPhoto(), // video_cover
MTPint(), // ttl_seconds
MTPstring()); // query
};
@@ -550,6 +551,7 @@ void SendConfirmedFile(
| (file->spoiler ? Flag::f_spoiler : Flag())),
file->document,
MTPVector<MTPDocument>(), // alt_documents
MTPPhoto(), // video_cover
MTPint());
} else if (file->type == SendMediaType::Audio) {
const auto ttlSeconds = file->to.options.ttlSeconds;
@@ -560,6 +562,7 @@ void SendConfirmedFile(
| (ttlSeconds ? Flag::f_ttl_seconds : Flag())),
file->document,
MTPVector<MTPDocument>(), // alt_documents
MTPPhoto(), // video_cover
MTP_int(ttlSeconds));
} else if (file->type == SendMediaType::Round) {
using Flag = MTPDmessageMediaDocument::Flag;
@@ -571,6 +574,7 @@ void SendConfirmedFile(
| (file->spoiler ? Flag::f_spoiler : Flag())),
file->document,
MTPVector<MTPDocument>(), // alt_documents
MTPPhoto(), // video_cover
MTP_int(ttlSeconds));
} else {
Unexpected("Type in sendFilesConfirmed.");