aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/share.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/share.ts')
-rw-r--r--server/lib/activitypub/share.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/share.ts b/server/lib/activitypub/share.ts
index 5e426f5db..1f8a8f3c4 100644
--- a/server/lib/activitypub/share.ts
+++ b/server/lib/activitypub/share.ts
@@ -1,7 +1,7 @@
1import { Transaction } from 'sequelize' 1import { Transaction } from 'sequelize'
2import { VideoShareModel } from '../../models/video/video-share' 2import { VideoShareModel } from '../../models/video/video-share'
3import { sendUndoAnnounce, sendVideoAnnounce } from './send' 3import { sendUndoAnnounce, sendVideoAnnounce } from './send'
4import { getVideoAnnounceActivityPubUrl } from './url' 4import { getLocalVideoAnnounceActivityPubUrl } from './url'
5import * as Bluebird from 'bluebird' 5import * as Bluebird from 'bluebird'
6import { doRequest } from '../../helpers/requests' 6import { doRequest } from '../../helpers/requests'
7import { getOrCreateActorAndServerAndModel } from './actor' 7import { getOrCreateActorAndServerAndModel } from './actor'
@@ -74,7 +74,7 @@ export {
74async function shareByServer (video: MVideo, t: Transaction) { 74async function shareByServer (video: MVideo, t: Transaction) {
75 const serverActor = await getServerActor() 75 const serverActor = await getServerActor()
76 76
77 const serverShareUrl = getVideoAnnounceActivityPubUrl(serverActor, video) 77 const serverShareUrl = getLocalVideoAnnounceActivityPubUrl(serverActor, video)
78 const [ serverShare ] = await VideoShareModel.findOrCreate({ 78 const [ serverShare ] = await VideoShareModel.findOrCreate({
79 defaults: { 79 defaults: {
80 actorId: serverActor.id, 80 actorId: serverActor.id,
@@ -91,7 +91,7 @@ async function shareByServer (video: MVideo, t: Transaction) {
91} 91}
92 92
93async function shareByVideoChannel (video: MVideoAccountLight, t: Transaction) { 93async function shareByVideoChannel (video: MVideoAccountLight, t: Transaction) {
94 const videoChannelShareUrl = getVideoAnnounceActivityPubUrl(video.VideoChannel.Actor, video) 94 const videoChannelShareUrl = getLocalVideoAnnounceActivityPubUrl(video.VideoChannel.Actor, video)
95 const [ videoChannelShare ] = await VideoShareModel.findOrCreate({ 95 const [ videoChannelShare ] = await VideoShareModel.findOrCreate({
96 defaults: { 96 defaults: {
97 actorId: video.VideoChannel.actorId, 97 actorId: video.VideoChannel.actorId,