2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Fix scheduled messages from ShareBox.

Fixes #6497.
This commit is contained in:
John Preston
2019-09-08 21:26:17 +03:00
parent 3d78c637a2
commit 5f26e92f5c

View File

@@ -277,6 +277,9 @@ void FastShareMessage(not_null<HistoryItem*> item) {
: MTPmessages_ForwardMessages::Flag(0))
| (options.silent
? MTPmessages_ForwardMessages::Flag::f_silent
: MTPmessages_ForwardMessages::Flag(0))
| (options.scheduled
? MTPmessages_ForwardMessages::Flag::f_schedule_date
: MTPmessages_ForwardMessages::Flag(0));
auto msgIds = QVector<MTPint>();
msgIds.reserve(data->msgIds.size());
@@ -295,6 +298,7 @@ void FastShareMessage(not_null<HistoryItem*> item) {
if (!comment.text.isEmpty()) {
auto message = ApiWrap::MessageToSend(history);
message.textWithTags = comment;
message.action.options = options;
message.action.clearDraft = false;
history->session().api().sendMessage(std::move(message));
}
@@ -305,7 +309,7 @@ void FastShareMessage(not_null<HistoryItem*> item) {
MTP_vector<MTPint>(msgIds),
MTP_vector<MTPlong>(generateRandom()),
peer->input,
MTP_int(0)),
MTP_int(options.scheduled)),
rpcDone(base::duplicate(doneCallback)),
nullptr,
0,