2019-08-12 12:11:34 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2019-09-13 06:06:02 +00:00
|
|
|
class History;
|
|
|
|
|
2019-08-12 12:11:34 +00:00
|
|
|
namespace Api {
|
|
|
|
|
|
|
|
struct SendOptions {
|
|
|
|
TimeId scheduled = 0;
|
|
|
|
bool silent = false;
|
|
|
|
bool handleSupportSwitch = false;
|
|
|
|
bool removeWebPageId = false;
|
|
|
|
};
|
|
|
|
|
2019-08-20 13:21:10 +00:00
|
|
|
enum class SendType {
|
|
|
|
Normal,
|
|
|
|
Scheduled,
|
2020-01-15 02:31:28 +00:00
|
|
|
ScheduledToUser, // For "Send when online".
|
2019-08-20 13:21:10 +00:00
|
|
|
};
|
|
|
|
|
2019-08-12 12:11:34 +00:00
|
|
|
struct SendAction {
|
|
|
|
explicit SendAction(not_null<History*> history) : history(history) {
|
|
|
|
}
|
|
|
|
|
|
|
|
not_null<History*> history;
|
|
|
|
SendOptions options;
|
|
|
|
MsgId replyTo = 0;
|
2019-08-30 10:17:18 +00:00
|
|
|
bool clearDraft = true;
|
2019-08-12 12:11:34 +00:00
|
|
|
bool generateLocal = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct MessageToSend {
|
|
|
|
explicit MessageToSend(not_null<History*> history) : action(history) {
|
|
|
|
}
|
|
|
|
|
|
|
|
SendAction action;
|
|
|
|
TextWithTags textWithTags;
|
|
|
|
WebPageId webPageId = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Api
|