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;
|
2020-05-28 14:57:21 +00:00
|
|
|
class RPCError;
|
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,
|
|
|
|
SendOptions options);
|
|
|
|
|
|
|
|
void EditMessageWithUploadedPhoto(
|
|
|
|
HistoryItem *item,
|
|
|
|
const MTPInputFile &file,
|
|
|
|
SendOptions options);
|
|
|
|
|
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,
|
|
|
|
Fn<void(const RPCError &)> fail);
|
|
|
|
|
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,
|
|
|
|
Fn<void(const RPCError &, mtpRequestId requestId)> fail);
|
|
|
|
|
2020-05-28 11:43:11 +00:00
|
|
|
} // namespace Api
|