diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-26 11:50:18 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-26 11:50:18 +0100 |
commit | 92315d979c3f424d81f8fca3c8831d81e4e2a6d6 (patch) | |
tree | fab1a460dba5efc217a5be91e0ed7303cd5d3633 /server/lib/activitypub/process | |
parent | 23ac334389a6b11ba0656a18ff760fb45f7bec57 (diff) | |
download | PeerTube-92315d979c3f424d81f8fca3c8831d81e4e2a6d6.tar.gz PeerTube-92315d979c3f424d81f8fca3c8831d81e4e2a6d6.tar.zst PeerTube-92315d979c3f424d81f8fca3c8831d81e4e2a6d6.zip |
More robust channel change federation
Diffstat (limited to 'server/lib/activitypub/process')
-rw-r--r-- | server/lib/activitypub/process/process-update.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/server/lib/activitypub/process/process-update.ts b/server/lib/activitypub/process/process-update.ts index 6d2fff3fe..849f70b94 100644 --- a/server/lib/activitypub/process/process-update.ts +++ b/server/lib/activitypub/process/process-update.ts | |||
@@ -62,7 +62,15 @@ async function processUpdateVideo (actor: MActorSignature, activity: ActivityUpd | |||
62 | return undefined | 62 | return undefined |
63 | } | 63 | } |
64 | 64 | ||
65 | const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: videoObject.id, allowRefresh: false, fetchType: 'all' }) | 65 | const { video, created } = await getOrCreateVideoAndAccountAndChannel({ |
66 | videoObject: videoObject.id, | ||
67 | allowRefresh: false, | ||
68 | fetchType: 'all' | ||
69 | }) | ||
70 | // We did not have this video, it has been created so no need to update | ||
71 | if (created) return | ||
72 | |||
73 | // Load new channel | ||
66 | const channelActor = await getOrCreateVideoChannelFromVideoObject(videoObject) | 74 | const channelActor = await getOrCreateVideoChannelFromVideoObject(videoObject) |
67 | 75 | ||
68 | const account = actor.Account as MAccountIdActor | 76 | const account = actor.Account as MAccountIdActor |