2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Move sendMessage and sendInlineResult to ApiWrap.

This commit is contained in:
John Preston
2018-06-26 16:34:38 +01:00
parent ff53404d5b
commit 33095966af
14 changed files with 362 additions and 331 deletions

View File

@@ -21,6 +21,11 @@ class AuthSession;
struct MessageGroupId;
struct SendingAlbum;
enum class SendMediaType;
struct FileLoadTo;
namespace InlineBots {
class Result;
} // namespace InlineBots
namespace Storage {
enum class SharedMediaType : signed char;
@@ -221,8 +226,7 @@ public:
Fn<void()> callbackNotModified = nullptr);
struct SendOptions {
SendOptions(not_null<History*> history) : history(history) {
}
SendOptions(not_null<History*> history);
not_null<History*> history;
MsgId replyTo = 0;
@@ -277,6 +281,21 @@ public:
bool silent);
void cancelLocalItem(not_null<HistoryItem*> item);
struct MessageToSend {
MessageToSend(not_null<History*> history);
not_null<History*> history;
TextWithTags textWithTags;
MsgId replyTo = 0;
WebPageId webPageId = 0;
bool clearDraft = true;
};
void sendMessage(MessageToSend &&message);
void sendInlineResult(
not_null<UserData*> bot,
not_null<InlineBots::Result*> data,
const SendOptions &options);
~ApiWrap();
private:
@@ -439,6 +458,7 @@ private:
const MTPInputMedia &media,
bool silent,
uint64 randomId);
FileLoadTo fileLoadTaskOptions(const SendOptions &options) const;
void readFeeds();