mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-11-22 16:17:29 +00:00
Fix reel fallback
This commit is contained in:
parent
81fb064318
commit
c5d8b5788b
@ -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
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user