fix issue with non-masto AP instances which may set outbox.first to the actual first page of the outbox instead of a URL
This commit is contained in:
parent
0c9f0c790f
commit
c1c0e2f7d0
|
@ -80,9 +80,14 @@ module.exports = async function (opts) {
|
||||||
|
|
||||||
user = await apGet(userUrl,24 * hour);
|
user = await apGet(userUrl,24 * hour);
|
||||||
isIndex = true;
|
isIndex = true;
|
||||||
var outbox = await apGet(user.outbox,24 * hour);
|
var outbox = await apGet(user.outbox, 1 * hour);
|
||||||
feedUrl = outbox.first;
|
|
||||||
feed = await apGet(feedUrl,hour/6);// 10 mins. Because the base feed URL can get new toots quickly.
|
// outbox.first can be a string for a URL, or an object with stuffs in it
|
||||||
|
if (typeof outbox.first == 'object'){
|
||||||
|
feed = outbox.first;
|
||||||
|
} else {
|
||||||
|
feed = await apGet(outbox.first, hour/6);// 10 mins. Because the base feed URL can get new toots quickly.
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue