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
1 changed files with 8 additions and 3 deletions
|
@ -80,9 +80,14 @@ module.exports = async function (opts) {
|
|||
|
||||
user = await apGet(userUrl,24 * hour);
|
||||
isIndex = true;
|
||||
var outbox = await apGet(user.outbox,24 * hour);
|
||||
feedUrl = outbox.first;
|
||||
feed = await apGet(feedUrl,hour/6);// 10 mins. Because the base feed URL can get new toots quickly.
|
||||
var outbox = await apGet(user.outbox, 1 * hour);
|
||||
|
||||
// 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.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue