Bulk import/export supports direct messages from a user to themselves (#13200)
* Test added to check support for import of messages sent to your own DM channel * Support for single member direct channel messages and posts Now bulk import is able to export/import the self direct channel and the posts inside * Improve how the copy of channel members for DM and DM posts * Improved the tests for the export self-channels
Этот коммит содержится в:
коммит произвёл
Saturnino Abril
родитель
8cafd11162
Коммит
8347f3e1fa
@@ -532,12 +532,6 @@ func (a *App) ExportAllDirectChannels(writer io.Writer) *model.AppError {
|
||||
continue
|
||||
}
|
||||
|
||||
// There's no import support for single member channels yet.
|
||||
if len(*channel.Members) == 1 {
|
||||
mlog.Debug("Bulk export for direct channels containing a single member is not supported.")
|
||||
continue
|
||||
}
|
||||
|
||||
channelLine := ImportLineFromDirectChannel(channel)
|
||||
if err := a.ExportWriteLine(writer, channelLine); err != nil {
|
||||
return err
|
||||
@@ -568,12 +562,6 @@ func (a *App) ExportAllDirectPosts(writer io.Writer) *model.AppError {
|
||||
continue
|
||||
}
|
||||
|
||||
// There's no import support for single member channels yet.
|
||||
if len(*post.ChannelMembers) == 1 {
|
||||
mlog.Debug("Bulk export for posts containing a single member is not supported.")
|
||||
continue
|
||||
}
|
||||
|
||||
// Do the Replies.
|
||||
replies, err := a.buildPostReplies(post.Id)
|
||||
if err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user