2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Added ability to edit media in scheduled messages.

This commit is contained in:
23rd
2020-05-30 11:47:32 +03:00
parent b02b690747
commit 5c097887ef
9 changed files with 73 additions and 19 deletions

View File

@@ -936,12 +936,18 @@ void EditCaptionBox::save() {
TextUtilities::ConvertTextTagsToEntities(textWithTags.tags)
};
auto options = Api::SendOptions();
options.scheduled = item->isScheduled() ? item->date() : 0;
if (!_preparedList.files.empty()) {
auto action = Api::SendAction(item->history());
action.options = options;
_controller->session().api().editMedia(
std::move(_preparedList),
(!_asFile && _photo) ? SendMediaType::Photo : SendMediaType::File,
_field->getTextWithAppliedMarkdown(),
Api::SendAction(item->history()),
action,
item->fullId().msg);
closeBox();
return;
@@ -977,7 +983,7 @@ void EditCaptionBox::save() {
}
});
_saveRequestId = Api::EditCaption(item, sending, done, fail);
_saveRequestId = Api::EditCaption(item, sending, options, done, fail);
}
void EditCaptionBox::setName(QString nameString, qint64 size) {