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.tsindex 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, Chif (!isVideoChannelDescriptionValid(channelImportData.description)) channelImportData.description = nullif (!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 = undefineddiff --git a/server/core/lib/user-import-export/importers/videos-importer.ts b/server/core/lib/user-import-export/importers/videos-importer.tsindex 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: nullconst 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}`)}