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

Support stories file reference refreshing.

This commit is contained in:
John Preston
2023-05-26 12:45:50 +04:00
parent 7a042c23e9
commit b195ec4fd5
8 changed files with 68 additions and 21 deletions

View File

@@ -2509,6 +2509,15 @@ void ApiWrap::refreshFileReference(
request(MTPaccount_GetSavedRingtones(MTP_long(0)));
}, [&](Data::FileOriginPremiumPreviews data) {
request(MTPhelp_GetPremiumPromo());
}, [&](Data::FileOriginStory data) {
const auto user = _session->data().peer(data.peerId)->asUser();
if (user) {
request(MTPstories_GetStoriesByID(
user->inputUser,
MTP_vector<MTPint>(1, MTP_int(data.storyId))));
} else {
fail();
}
}, [&](v::null_t) {
fail();
});