1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2024-11-26 09:37:28 +00:00

Fix reel fallback

This commit is contained in:
Cadence Fish 2020-02-03 02:45:03 +13:00
parent 81fb064318
commit c5d8b5788b
No known key found for this signature in database
GPG Key ID: 81015DF9AA8607E1

View File

@ -23,7 +23,10 @@ async function fetchUser(username) {
return fetchUserFromHTML(username).catch(error => { return fetchUserFromHTML(username).catch(error => {
if (error === constants.symbols.INSTAGRAM_DEMANDS_LOGIN || error === constants.symbols.RATE_LIMITED) { if (error === constants.symbols.INSTAGRAM_DEMANDS_LOGIN || error === constants.symbols.RATE_LIMITED) {
const userID = db.prepare("SELECT user_id FROM Users WHERE username = ?").pluck().get(username) const userID = db.prepare("SELECT user_id FROM Users WHERE username = ?").pluck().get(username)
if (userID) return fetchUserFromCombined(userID, username) if (userID) {
requestCache.cache.delete("user/"+username)
return fetchUserFromCombined(userID, username)
}
} }
throw error throw error
}) })