[MM-22133] Allow exporting and importing archived channels (#23724)
Этот коммит содержится в:
@@ -100,6 +100,7 @@ func init() {
|
||||
_ = ExportCreateCmd.Flags().MarkDeprecated("attachments", "the tool now includes attachments by default. The flag will be removed in a future version.")
|
||||
|
||||
ExportCreateCmd.Flags().Bool("no-attachments", false, "Set to true to exclude file attachments in the export file.")
|
||||
ExportCreateCmd.Flags().Bool("include-archived-channels", false, "Set to true to include archived channels in the export file.")
|
||||
|
||||
ExportDownloadCmd.Flags().Bool("resume", false, "Set to true to resume an export download.")
|
||||
_ = ExportDownloadCmd.Flags().MarkHidden("resume")
|
||||
@@ -136,6 +137,11 @@ func exportCreateCmdF(c client.Client, command *cobra.Command, args []string) er
|
||||
data["include_attachments"] = "true"
|
||||
}
|
||||
|
||||
includeArchivedChannels, _ := command.Flags().GetBool("include-archived-channels")
|
||||
if includeArchivedChannels {
|
||||
data["include_archived_channels"] = "true"
|
||||
}
|
||||
|
||||
job, _, err := c.CreateJob(context.TODO(), &model.Job{
|
||||
Type: model.JobTypeExportProcess,
|
||||
Data: data,
|
||||
|
||||
@@ -20,8 +20,9 @@ Options
|
||||
|
||||
::
|
||||
|
||||
-h, --help help for create
|
||||
--no-attachments Set to true to exclude file attachments in the export file.
|
||||
-h, --help help for create
|
||||
--include-archived-channels Set to true to include archived channels in the export file.
|
||||
--no-attachments Set to true to exclude file attachments in the export file.
|
||||
|
||||
Options inherited from parent commands
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Ссылка в новой задаче
Block a user