Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix channel import

Chocobozzzaf15c330706c
diff --git a/server/core/lib/user-import-export/importers/channels-importer.ts b/server/core/lib/user-import-export/importers/channels-importer.ts
index 40bd978764..3326ab2f7b 100644
--- a/server/core/lib/user-import-export/importers/channels-importer.ts
+++ b/server/core/lib/user-import-export/importers/channels-importer.ts
@@ -37,7 +37,9 @@ export class ChannelsImporter extends AbstractUserImporter<ChannelExportJSON, Ch
if (!isVideoChannelDescriptionValid(channelImportData.description)) channelImportData.description = null
if (!isVideoChannelSupportValid(channelImportData.support)) channelImportData.support = null
- if (!isVideoChannelPublicEmailValid(channelImportData.publicEmail)) channelImportData.publicEmail = null
+ if (channelImportData.publicEmail && !isVideoChannelPublicEmailValid(channelImportData.publicEmail)) {
+ channelImportData.publicEmail = null
+ }
if (channelImportData.playerSettings) {
if (!isPlayerChannelThemeSettingValid(channelImportData.playerSettings.theme)) channelImportData.playerSettings.theme = undefined
diff --git a/server/core/lib/user-import-export/importers/videos-importer.ts b/server/core/lib/user-import-export/importers/videos-importer.ts
index a522b23c9c..025c53097f 100644
--- a/server/core/lib/user-import-export/importers/videos-importer.ts
+++ b/server/core/lib/user-import-export/importers/videos-importer.ts
@@ -183,7 +183,7 @@ export class VideosImporter extends AbstractUserImporter<VideoExportJSON, Import
: null
const videoChannel = await VideoChannelModel.loadLocalByNameAndPopulateAccount(videoImportData.channel.name)
- if (!videoChannel) throw new Error(`Channel ${videoImportData} not found`)
+ if (!videoChannel) throw new Error(`Channel ${videoImportData.channel.name} not found`)
if (videoChannel.accountId !== this.user.Account.id) {
throw new Error(`Channel ${videoChannel.name} is not owned by user ${this.user.username}`)
}