diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-23 12:04:15 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | 5b77537ce54832f47931ba47dc513be2a9197f92 (patch) | |
tree | 4f968168f1346faa82ac6c9663778e1cca65b02a /server/lib/activitypub/process | |
parent | d8e9a42c4b048b2669ab6a61704682ce23fbcf99 (diff) | |
download | PeerTube-5b77537ce54832f47931ba47dc513be2a9197f92.tar.gz PeerTube-5b77537ce54832f47931ba47dc513be2a9197f92.tar.zst PeerTube-5b77537ce54832f47931ba47dc513be2a9197f92.zip |
Correctly notify on auto blacklist
Diffstat (limited to 'server/lib/activitypub/process')
-rw-r--r-- | server/lib/activitypub/process/process-announce.ts | 2 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-create.ts | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/process/process-announce.ts b/server/lib/activitypub/process/process-announce.ts index bbf1bd3a8..1fe347506 100644 --- a/server/lib/activitypub/process/process-announce.ts +++ b/server/lib/activitypub/process/process-announce.ts | |||
@@ -63,5 +63,5 @@ async function processVideoShare (actorAnnouncer: ActorModel, activity: Activity | |||
63 | return undefined | 63 | return undefined |
64 | }) | 64 | }) |
65 | 65 | ||
66 | if (videoCreated) Notifier.Instance.notifyOnNewVideo(video) | 66 | if (videoCreated) Notifier.Instance.notifyOnNewVideoIfNeeded(video) |
67 | } | 67 | } |
diff --git a/server/lib/activitypub/process/process-create.ts b/server/lib/activitypub/process/process-create.ts index b9f584aa5..1e893cdeb 100644 --- a/server/lib/activitypub/process/process-create.ts +++ b/server/lib/activitypub/process/process-create.ts | |||
@@ -48,9 +48,9 @@ export { | |||
48 | async function processCreateVideo (activity: ActivityCreate) { | 48 | async function processCreateVideo (activity: ActivityCreate) { |
49 | const videoToCreateData = activity.object as VideoTorrentObject | 49 | const videoToCreateData = activity.object as VideoTorrentObject |
50 | 50 | ||
51 | const { video, created, autoBlacklisted } = await getOrCreateVideoAndAccountAndChannel({ videoObject: videoToCreateData }) | 51 | const { video, created } = await getOrCreateVideoAndAccountAndChannel({ videoObject: videoToCreateData }) |
52 | 52 | ||
53 | if (created && !autoBlacklisted) Notifier.Instance.notifyOnNewVideo(video) | 53 | if (created) Notifier.Instance.notifyOnNewVideoIfNeeded(video) |
54 | 54 | ||
55 | return video | 55 | return video |
56 | } | 56 | } |