aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/migrations
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-20 11:21:08 +0100
committerChocobozzz <me@florianbigard.com>2020-11-20 11:21:08 +0100
commitde94ac86a211dec657332d964693857ec235ce40 (patch)
tree3bff96a40e7c862d83561a26249992b07331b0a2 /server/initializers/migrations
parent3fba4b6bce69247b1d37f923894d8f44818a891c (diff)
downloadPeerTube-de94ac86a211dec657332d964693857ec235ce40.tar.gz
PeerTube-de94ac86a211dec657332d964693857ec235ce40.tar.zst
PeerTube-de94ac86a211dec657332d964693857ec235ce40.zip
Fix incorrect IDs in AP federation
Diffstat (limited to 'server/initializers/migrations')
-rw-r--r--server/initializers/migrations/0100-activitypub.ts6
1 files changed, 3 insertions, 3 deletions
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 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2import { createPrivateAndPublicKeys } from '../../helpers/peertube-crypto' 2import { createPrivateAndPublicKeys } from '../../helpers/peertube-crypto'
3import { shareVideoByServerAndChannel } from '../../lib/activitypub/share' 3import { shareVideoByServerAndChannel } from '../../lib/activitypub/share'
4import { getVideoActivityPubUrl, getVideoChannelActivityPubUrl } from '../../lib/activitypub/url' 4import { getLocalVideoActivityPubUrl, getLocalVideoChannelActivityPubUrl } from '../../lib/activitypub/url'
5import { createLocalAccountWithoutKeys } from '../../lib/user' 5import { createLocalAccountWithoutKeys } from '../../lib/user'
6import { ApplicationModel } from '../../models/application/application' 6import { ApplicationModel } from '../../models/application/application'
7import { SERVER_ACTOR_NAME } from '../constants' 7import { SERVER_ACTOR_NAME } from '../constants'
@@ -132,7 +132,7 @@ async function up (utils: {
132 132
133 const videos = await db.Video.findAll() 133 const videos = await db.Video.findAll()
134 for (const video of videos) { 134 for (const video of videos) {
135 video.url = getVideoActivityPubUrl(video) 135 video.url = getLocalVideoActivityPubUrl(video)
136 await video.save() 136 await video.save()
137 } 137 }
138 138
@@ -151,7 +151,7 @@ async function up (utils: {
151 151
152 const videoChannels = await db.VideoChannel.findAll() 152 const videoChannels = await db.VideoChannel.findAll()
153 for (const videoChannel of videoChannels) { 153 for (const videoChannel of videoChannels) {
154 videoChannel.url = getVideoChannelActivityPubUrl(videoChannel) 154 videoChannel.url = getLocalVideoChannelActivityPubUrl(videoChannel)
155 await videoChannel.save() 155 await videoChannel.save()
156 } 156 }
157 157