Compare commits

..

No commits in common. "d80a69920f4163ab4d3836247eb3865ccd7f9fcb" and "f1940a7cee9109aacd8b0089a5733b1e7632f1cc" have entirely different histories.

2 changed files with 8 additions and 11 deletions

BIN
bun.lockb Executable file

Binary file not shown.

View File

@ -4,17 +4,14 @@ import { createSource, createSourceOptions, extractImages, downloadImages, getPo
let nitter = {}
export const fetchChannelFromInstances = async (source) => {
let cachedLinkIndex = source.instances.indexOf(source.cache.link)
let index = 0
let instances
let index = 0
let instances = source.instances
let cachedLink = source.cache.link
let channel
if(cachedLinkIndex !== -1) {
instances = source.instances.toSpliced(cachedLinkIndex, 1)
instances.unshift(source.instances[cachedLinkIndex])
} else {
instances = [ ...source.instances ]
}
if(cachedLink) {
instances.unshift(cachedLink.hostname)
}
while(!channel && index != instances.length) {
source.hostname = instances[index]