MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / SendExistingPhoto

Function SendExistingPhoto

Telegram/SourceFiles/api/api_sending.cpp:328–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328void SendExistingPhoto(
329 MessageToSend &&message,
330 not_null<PhotoData*> photo,
331 std::optional<MsgId> localMessageId) {
332 const auto inputMedia = [=] {
333 return MTP_inputMediaPhoto(
334 MTP_flags(0),
335 photo->mtpInput(),
336 MTPint(), // ttl_seconds
337 MTPInputDocument()); // video
338 };
339 SendExistingMedia(
340 std::move(message),
341 photo,
342 inputMedia,
343 Data::FileOrigin(),
344 std::move(localMessageId));
345}
346
347bool SendDice(MessageToSend &message) {
348 const auto full = QStringView(message.textWithTags.text).trimmed();

Callers 5

sendExistingPhotoMethod · 0.85
sendExistingPhotoMethod · 0.85
sendExistingPhotoMethod · 0.85
sendExistingPhotoMethod · 0.85
sendExistingPhotoMethod · 0.85

Calls 4

MTP_flagsFunction · 0.85
SendExistingMediaFunction · 0.85
FileOriginClass · 0.70
mtpInputMethod · 0.45

Tested by

no test coverage detected