mirror of https://github.com/procxx/kepka.git
Refresh file reference from scheduled messages.
This commit is contained in:
parent
c46bcef9ff
commit
470b67f557
|
@ -2997,7 +2997,13 @@ void ApiWrap::refreshFileReference(
|
||||||
};
|
};
|
||||||
origin.data.match([&](Data::FileOriginMessage data) {
|
origin.data.match([&](Data::FileOriginMessage data) {
|
||||||
if (const auto item = _session->data().message(data)) {
|
if (const auto item = _session->data().message(data)) {
|
||||||
if (const auto channel = item->history()->peer->asChannel()) {
|
if (item->isScheduled()) {
|
||||||
|
const auto &scheduled = session().data().scheduledMessages();
|
||||||
|
const auto realId = scheduled.lookupId(item);
|
||||||
|
request(MTPmessages_GetScheduledMessages(
|
||||||
|
item->history()->peer->input,
|
||||||
|
MTP_vector<MTPint>(1, MTP_int(realId))));
|
||||||
|
} else if (const auto channel = item->history()->peer->asChannel()) {
|
||||||
request(MTPchannels_GetMessages(
|
request(MTPchannels_GetMessages(
|
||||||
channel->inputChannel,
|
channel->inputChannel,
|
||||||
MTP_vector<MTPInputMessage>(
|
MTP_vector<MTPInputMessage>(
|
||||||
|
|
Loading…
Reference in New Issue