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

Function SuggestToMTP

Telegram/SourceFiles/api/api_common.cpp:17–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace Api {
16
17MTPSuggestedPost SuggestToMTP(SuggestOptions suggest) {
18 using Flag = MTPDsuggestedPost::Flag;
19 return suggest.exists
20 ? MTP_suggestedPost(
21 MTP_flags((suggest.date ? Flag::f_schedule_date : Flag())
22 | (suggest.price().empty() ? Flag() : Flag::f_price)),
23 StarsAmountToTL(suggest.price()),
24 MTP_int(suggest.date))
25 : MTPSuggestedPost();
26}
27
28SendAction::SendAction(
29 not_null<Data::Thread*> thread,

Callers 14

saveDraftsToCloudMethod · 0.85
forwardMessagesMethod · 0.85
sendRichMessageMethod · 0.85
sendMessageMethod · 0.85
sendMediaWithRandomIdMethod · 0.85
sendMultiPaidMediaMethod · 0.85
PrepareShareBoxFunction · 0.85
SendSimpleMediaFunction · 0.85
SendExistingMediaFunction · 0.85
SendDiceFunction · 0.85
SuggestMediaFunction · 0.85

Calls 6

MTP_flagsFunction · 0.85
StarsAmountToTLFunction · 0.85
priceMethod · 0.80
FlagEnum · 0.50
MTP_intFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected