diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-18 10:53:54 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-18 15:42:20 +0100 |
commit | f05a1c30c15d2ae35c11e241ca039a72eeb7d6ad (patch) | |
tree | 6d90c0de5dd3ad506e738d447e4f396951ed5624 /server/lib/activitypub/actor.ts | |
parent | 1174a8479ab9ee47b3305d668fe757435057a298 (diff) | |
download | PeerTube-f05a1c30c15d2ae35c11e241ca039a72eeb7d6ad.tar.gz PeerTube-f05a1c30c15d2ae35c11e241ca039a72eeb7d6ad.tar.zst PeerTube-f05a1c30c15d2ae35c11e241ca039a72eeb7d6ad.zip |
Don't show videos of remote instance after unfollow
Diffstat (limited to 'server/lib/activitypub/actor.ts')
-rw-r--r-- | server/lib/activitypub/actor.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts index 2e0f3cfc2..a39b4e137 100644 --- a/server/lib/activitypub/actor.ts +++ b/server/lib/activitypub/actor.ts | |||
@@ -309,7 +309,10 @@ async function refreshActorIfNeeded (actor: ActorModel) { | |||
309 | 309 | ||
310 | const actorUrl = await getUrlFromWebfinger(actor.preferredUsername, actor.getHost()) | 310 | const actorUrl = await getUrlFromWebfinger(actor.preferredUsername, actor.getHost()) |
311 | const result = await fetchRemoteActor(actorUrl) | 311 | const result = await fetchRemoteActor(actorUrl) |
312 | if (result === undefined) throw new Error('Cannot fetch remote actor in refresh actor.') | 312 | if (result === undefined) { |
313 | logger.warn('Cannot fetch remote actor in refresh actor.') | ||
314 | return actor | ||
315 | } | ||
313 | 316 | ||
314 | return sequelizeTypescript.transaction(async t => { | 317 | return sequelizeTypescript.transaction(async t => { |
315 | updateInstanceWithAnother(actor, result.actor) | 318 | updateInstanceWithAnother(actor, result.actor) |