diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-15 16:28:35 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | 8e10cf1a5a438a00e5f7e0691cb830769867cffc (patch) | |
tree | 23c0aeb43d7fb05b2d280c37b4334c2f320b647e /server/lib/activitypub | |
parent | 8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391 (diff) | |
download | PeerTube-8e10cf1a5a438a00e5f7e0691cb830769867cffc.tar.gz PeerTube-8e10cf1a5a438a00e5f7e0691cb830769867cffc.tar.zst PeerTube-8e10cf1a5a438a00e5f7e0691cb830769867cffc.zip |
Fix video upload and videos list
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r-- | server/lib/activitypub/send-request.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/lib/activitypub/send-request.ts b/server/lib/activitypub/send-request.ts index 1a6cebc03..1dad51828 100644 --- a/server/lib/activitypub/send-request.ts +++ b/server/lib/activitypub/send-request.ts | |||
@@ -11,6 +11,7 @@ import { signObject, activityPubContextify } from '../../helpers' | |||
11 | import { Activity } from '../../../shared' | 11 | import { Activity } from '../../../shared' |
12 | import { VideoAbuseInstance } from '../../models/video/video-abuse-interface' | 12 | import { VideoAbuseInstance } from '../../models/video/video-abuse-interface' |
13 | import { getActivityPubUrl } from '../../helpers/activitypub' | 13 | import { getActivityPubUrl } from '../../helpers/activitypub' |
14 | import { logger } from '../../helpers/logger' | ||
14 | 15 | ||
15 | async function sendCreateVideoChannel (videoChannel: VideoChannelInstance, t: Sequelize.Transaction) { | 16 | async function sendCreateVideoChannel (videoChannel: VideoChannelInstance, t: Sequelize.Transaction) { |
16 | const videoChannelObject = videoChannel.toActivityPubObject() | 17 | const videoChannelObject = videoChannel.toActivityPubObject() |
@@ -100,7 +101,11 @@ export { | |||
100 | // --------------------------------------------------------------------------- | 101 | // --------------------------------------------------------------------------- |
101 | 102 | ||
102 | async function broadcastToFollowers (data: any, fromAccount: AccountInstance, t: Sequelize.Transaction) { | 103 | async function broadcastToFollowers (data: any, fromAccount: AccountInstance, t: Sequelize.Transaction) { |
103 | const result = await db.AccountFollow.listAcceptedFollowerUrlsForApi(fromAccount.id, 0) | 104 | const result = await db.AccountFollow.listAcceptedFollowerUrlsForApi(fromAccount.id) |
105 | if (result.data.length === 0) { | ||
106 | logger.info('Not broadcast because of 0 followers.') | ||
107 | return | ||
108 | } | ||
104 | 109 | ||
105 | const jobPayload = { | 110 | const jobPayload = { |
106 | uris: result.data, | 111 | uris: result.data, |