instagram: add missing awaits to getMediaId calls

This commit is contained in:
wukko 2024-05-03 19:50:55 +06:00
parent 6367ac90f5
commit 3ace1a59a2
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2

View File

@ -243,9 +243,9 @@ async function getPost(id) {
const token = bearer?.values()?.token;
// get media_id for mobile api, three methods
let media_id = getMediaId(id);
if (!media_id && token) media_id = getMediaId(id, { token });
if (!media_id && cookie) media_id = getMediaId(id, { cookie });
let media_id = await getMediaId(id);
if (!media_id && token) media_id = await getMediaId(id, { token });
if (!media_id && cookie) media_id = await getMediaId(id, { cookie });
// mobile api (bearer)
if (media_id && token) data = await requestMobileApi(id, { token });