mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-11 01:10:13 +00:00
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) {
|
||||
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(
|
||||
channel->inputChannel,
|
||||
MTP_vector<MTPInputMessage>(
|
||||
|
Loading…
Reference in New Issue
Block a user