2020-05-28 14:43:11 +03: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 16:48:00 +04:00
|
|
|
|
2023-10-20 17:48:15 +04:00
|
|
|
namespace Data {
|
|
|
|
struct WebPageDraft;
|
|
|
|
} // namespace Data
|
|
|
|
|
2021-03-12 16:48:00 +04:00
|
|
|
namespace MTP {
|
|
|
|
class Error;
|
|
|
|
} // namespace MTP
|
2020-05-28 14:43:11 +03:00
|
|
|
|
|
|
|
namespace Api {
|
|
|
|
|
|
|
|
struct SendOptions;
|
2021-11-16 16:38:31 +04:00
|
|
|
struct RemoteFileInfo;
|
2020-05-28 14:43:11 +03:00
|
|
|
|
2020-05-30 10:10:54 +03:00
|
|
|
const auto kDefaultEditMessagesErrors = {
|
|
|
|
u"MESSAGE_ID_INVALID"_q,
|
|
|
|
u"CHAT_ADMIN_REQUIRED"_q,
|
|
|
|
u"MESSAGE_EDIT_TIME_EXPIRED"_q,
|
|
|
|
};
|
|
|
|
|
2020-05-28 14:43:11 +03:00
|
|
|
void RescheduleMessage(
|
|
|
|
not_null<HistoryItem*> item,
|
|
|
|
SendOptions options);
|
|
|
|
|
2020-05-28 16:42:50 +03:00
|
|
|
void EditMessageWithUploadedDocument(
|
|
|
|
HistoryItem *item,
|
2021-11-16 16:38:31 +04:00
|
|
|
RemoteFileInfo info,
|
|
|
|
SendOptions options);
|
2020-05-28 16:42:50 +03:00
|
|
|
|
|
|
|
void EditMessageWithUploadedPhoto(
|
|
|
|
HistoryItem *item,
|
2021-11-16 16:38:31 +04:00
|
|
|
RemoteFileInfo info,
|
|
|
|
SendOptions options);
|
2020-05-28 16:42:50 +03:00
|
|
|
|
2020-05-28 17:57:21 +03:00
|
|
|
mtpRequestId EditCaption(
|
|
|
|
not_null<HistoryItem*> item,
|
|
|
|
const TextWithEntities &caption,
|
2020-05-30 11:47:32 +03:00
|
|
|
SendOptions options,
|
2022-08-05 13:37:30 +03:00
|
|
|
Fn<void()> done,
|
|
|
|
Fn<void(const QString &)> fail);
|
2020-05-28 17:57:21 +03:00
|
|
|
|
2020-05-30 02:08:31 +03:00
|
|
|
mtpRequestId EditTextMessage(
|
|
|
|
not_null<HistoryItem*> item,
|
|
|
|
const TextWithEntities &caption,
|
2023-10-20 17:48:15 +04:00
|
|
|
Data::WebPageDraft webpage,
|
2020-05-30 02:08:31 +03:00
|
|
|
SendOptions options,
|
2022-08-05 13:37:30 +03:00
|
|
|
Fn<void(mtpRequestId requestId)> done,
|
2024-05-07 17:47:52 +03:00
|
|
|
Fn<void(const QString &error, mtpRequestId requestId)> fail,
|
|
|
|
std::optional<bool> spoilerMediaOverride);
|
2020-05-30 02:08:31 +03:00
|
|
|
|
2020-05-28 14:43:11 +03:00
|
|
|
} // namespace Api
|