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'
async function up (utils: {
- transaction: Sequelize.Transaction,
- queryInterface: Sequelize.QueryInterface,
- sequelize: Sequelize.Sequelize,
+ transaction: Sequelize.Transaction
+ queryInterface: Sequelize.QueryInterface
+ sequelize: Sequelize.Sequelize
db: any
}): Promise<void> {
const q = utils.queryInterface
const videos = await db.Video.findAll()
for (const video of videos) {
- video.url = getVideoActivityPubUrl(video)
+ video.url = getLocalVideoActivityPubUrl(video)
await video.save()
}
const videoChannels = await db.VideoChannel.findAll()
for (const videoChannel of videoChannels) {
- videoChannel.url = getVideoChannelActivityPubUrl(videoChannel)
+ videoChannel.url = getLocalVideoChannelActivityPubUrl(videoChannel)
await videoChannel.save()
}