2020-05-28 11:43:11 +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
|
|
|
|
|
|
|
|
class HistoryItem;
|
2021-03-12 12:48:00 +00:00
|
|
|
|
|
|
|
namespace MTP {
|
|
|
|
class Error;
|
|
|
|
} // namespace MTP
|
2020-05-28 11:43:11 +00:00
|
|
|
|
|
|
|
namespace Api {
|
|
|
|
|
|
|
|
struct SendOptions;
|
|
|
|
|
2020-05-30 07:10:54 +00:00
|
|
|
const auto kDefaultEditMessagesErrors = {
|
|
|
|
u"MESSAGE_ID_INVALID"_q,
|
|
|
|
u"CHAT_ADMIN_REQUIRED"_q,
|
|
|
|
u"MESSAGE_EDIT_TIME_EXPIRED"_q,
|
|
|
|
};
|
|
|
|
|
2020-05-28 11:43:11 +00:00
|
|
|
void RescheduleMessage(
|
|
|
|
not_null<HistoryItem*> item,
|
|
|
|
SendOptions options);
|
|
|
|
|
2020-05-28 13:42:50 +00:00
|
|
|
void EditMessageWithUploadedDocument(
|
|
|
|
HistoryItem *item,
|
|
|
|
const MTPInputFile &file,
|
|
|
|
const std::optional<MTPInputFile> &thumb,
|
2021-03-14 09:46:17 +00:00
|
|
|
SendOptions options,
|
|
|
|
std::vector<MTPInputDocument> attachedStickers);
|
2020-05-28 13:42:50 +00:00
|
|
|
|
|
|
|
void EditMessageWithUploadedPhoto(
|
|
|
|
HistoryItem *item,
|
|
|
|
const MTPInputFile &file,
|
2021-03-14 09:46:17 +00:00
|
|
|
SendOptions options,
|
|
|
|
std::vector<MTPInputDocument> attachedStickers);
|
2020-05-28 13:42:50 +00:00
|
|
|
|
2020-05-28 14:57:21 +00:00
|
|
|
mtpRequestId EditCaption(
|
|
|
|
not_null<HistoryItem*> item,
|
|
|
|
const TextWithEntities &caption,
|
2020-05-30 08:47:32 +00:00
|
|
|
SendOptions options,
|
2020-05-28 14:57:21 +00:00
|
|
|
Fn<void(const MTPUpdates &)> done,
|
2021-03-12 12:48:00 +00:00
|
|
|
Fn<void(const MTP::Error &)> fail);
|
2020-05-28 14:57:21 +00:00
|
|
|
|
2020-05-29 23:08:31 +00:00
|
|
|
mtpRequestId EditTextMessage(
|
|
|
|
not_null<HistoryItem*> item,
|
|
|
|
const TextWithEntities &caption,
|
|
|
|
SendOptions options,
|
|
|
|
Fn<void(const MTPUpdates &, mtpRequestId requestId)> done,
|
2021-03-12 12:48:00 +00:00
|
|
|
Fn<void(const MTP::Error &, mtpRequestId requestId)> fail);
|
2020-05-29 23:08:31 +00:00
|
|
|
|
2020-05-28 11:43:11 +00:00
|
|
|
} // namespace Api
|