[MM-41998] Channel Info RHS: display number of files for a channel (#19822)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
@@ -709,6 +709,33 @@ func (th *TestHelper) CreateMessagePost(message string) *model.Post {
|
||||
return th.CreateMessagePostWithClient(th.Client, th.BasicChannel, message)
|
||||
}
|
||||
|
||||
func (th *TestHelper) CreatePostWithFiles(files ...*model.FileInfo) *model.Post {
|
||||
return th.CreatePostWithFilesWithClient(th.Client, th.BasicChannel, files...)
|
||||
}
|
||||
|
||||
func (th *TestHelper) CreatePostInChannelWithFiles(channel *model.Channel, files ...*model.FileInfo) *model.Post {
|
||||
return th.CreatePostWithFilesWithClient(th.Client, channel, files...)
|
||||
}
|
||||
|
||||
func (th *TestHelper) CreatePostWithFilesWithClient(client *model.Client4, channel *model.Channel, files ...*model.FileInfo) *model.Post {
|
||||
var fileIds model.StringArray
|
||||
for i := range files {
|
||||
fileIds = append(fileIds, files[i].Id)
|
||||
}
|
||||
|
||||
post := &model.Post{
|
||||
ChannelId: channel.Id,
|
||||
Message: "message_" + model.NewId(),
|
||||
FileIds: fileIds,
|
||||
}
|
||||
|
||||
rpost, _, err := client.CreatePost(post)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return rpost
|
||||
}
|
||||
|
||||
func (th *TestHelper) CreatePostWithClient(client *model.Client4, channel *model.Channel) *model.Post {
|
||||
id := model.NewId()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user