diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-20 11:21:08 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-11-20 11:21:08 +0100 |
commit | de94ac86a211dec657332d964693857ec235ce40 (patch) | |
tree | 3bff96a40e7c862d83561a26249992b07331b0a2 /server/initializers/migrations | |
parent | 3fba4b6bce69247b1d37f923894d8f44818a891c (diff) | |
download | PeerTube-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.ts | 6 |
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 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { createPrivateAndPublicKeys } from '../../helpers/peertube-crypto' | 2 | import { createPrivateAndPublicKeys } from '../../helpers/peertube-crypto' |
3 | import { shareVideoByServerAndChannel } from '../../lib/activitypub/share' | 3 | import { shareVideoByServerAndChannel } from '../../lib/activitypub/share' |
4 | import { getVideoActivityPubUrl, getVideoChannelActivityPubUrl } from '../../lib/activitypub/url' | 4 | import { getLocalVideoActivityPubUrl, getLocalVideoChannelActivityPubUrl } from '../../lib/activitypub/url' |
5 | import { createLocalAccountWithoutKeys } from '../../lib/user' | 5 | import { createLocalAccountWithoutKeys } from '../../lib/user' |
6 | import { ApplicationModel } from '../../models/application/application' | 6 | import { ApplicationModel } from '../../models/application/application' |
7 | import { SERVER_ACTOR_NAME } from '../constants' | 7 | import { 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 | ||