1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Don't show videos of remote instance after unfollow

This commit is contained in:
Chocobozzz 2018-01-18 10:53:54 +01:00
parent 1174a8479a
commit f05a1c30c1
No known key found for this signature in database
GPG key ID: 583A612D890159BE
38 changed files with 402 additions and 211 deletions

View file

@ -309,7 +309,10 @@ async function refreshActorIfNeeded (actor: ActorModel) {
const actorUrl = await getUrlFromWebfinger(actor.preferredUsername, actor.getHost())
const result = await fetchRemoteActor(actorUrl)
if (result === undefined) throw new Error('Cannot fetch remote actor in refresh actor.')
if (result === undefined) {
logger.warn('Cannot fetch remote actor in refresh actor.')
return actor
}
return sequelizeTypescript.transaction(async t => {
updateInstanceWithAnother(actor, result.actor)