From de94ac86a211dec657332d964693857ec235ce40 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 20 Nov 2020 11:21:08 +0100 Subject: Fix incorrect IDs in AP federation --- server/initializers/migrations/0100-activitypub.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/initializers/migrations/0100-activitypub.ts') diff --git a/server/initializers/migrations/0100-activitypub.ts b/server/initializers/migrations/0100-activitypub.ts index 05fd37406..49309286c 100644 --- a/server/initializers/migrations/0100-activitypub.ts +++ b/server/initializers/migrations/0100-activitypub.ts @@ -1,7 +1,7 @@ import * as Sequelize from 'sequelize' import { createPrivateAndPublicKeys } from '../../helpers/peertube-crypto' import { shareVideoByServerAndChannel } from '../../lib/activitypub/share' -import { getVideoActivityPubUrl, getVideoChannelActivityPubUrl } from '../../lib/activitypub/url' +import { getLocalVideoActivityPubUrl, getLocalVideoChannelActivityPubUrl } from '../../lib/activitypub/url' import { createLocalAccountWithoutKeys } from '../../lib/user' import { ApplicationModel } from '../../models/application/application' import { SERVER_ACTOR_NAME } from '../constants' @@ -132,7 +132,7 @@ async function up (utils: { const videos = await db.Video.findAll() for (const video of videos) { - video.url = getVideoActivityPubUrl(video) + video.url = getLocalVideoActivityPubUrl(video) await video.save() } @@ -151,7 +151,7 @@ async function up (utils: { const videoChannels = await db.VideoChannel.findAll() for (const videoChannel of videoChannels) { - videoChannel.url = getVideoChannelActivityPubUrl(videoChannel) + videoChannel.url = getLocalVideoChannelActivityPubUrl(videoChannel) await videoChannel.save() } -- cgit v1.2.3