api/snapchat: don't return thumb for photos in a picker

prevents saving low quality images with a long press
This commit is contained in:
wukko 2024-08-06 21:31:43 +06:00
parent 72a21b203e
commit 9ff27391d0
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -57,10 +57,10 @@ async function getStory(username, storyId) {
const defaultStory = data.props.pageProps.curatedHighlights[0];
if (defaultStory) {
return {
picker: defaultStory.snapList.map((snap) => ({
picker: defaultStory.snapList.map(snap => ({
type: snap.snapMediaType === 0 ? 'photo' : 'video',
url: snap.snapUrls.mediaUrl,
thumb: snap.snapUrls.mediaPreviewUrl.value
thumb: snap.snapMediaType ==! 0 ? snap.snapUrls.mediaPreviewUrl.value : undefined,
}))
}
}