MM-17468 - Improve thread fetching (#13653)
* Revert "Thread fetching revert (#13616)"
This reverts commit 8e0fe90897.
* renamed query param for clarity
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
57717a23af
Коммит
597a2b77cd
@@ -66,6 +66,10 @@ func (cfg *AutoPostCreator) UploadTestFile() ([]string, bool) {
|
||||
}
|
||||
|
||||
func (cfg *AutoPostCreator) CreateRandomPost() (*model.Post, bool) {
|
||||
return cfg.CreateRandomPostNested("", "")
|
||||
}
|
||||
|
||||
func (cfg *AutoPostCreator) CreateRandomPostNested(parentId, rootId string) (*model.Post, bool) {
|
||||
var fileIds []string
|
||||
if cfg.HasImage {
|
||||
var err1 bool
|
||||
@@ -84,10 +88,12 @@ func (cfg *AutoPostCreator) CreateRandomPost() (*model.Post, bool) {
|
||||
|
||||
post := &model.Post{
|
||||
ChannelId: cfg.channelid,
|
||||
ParentId: parentId,
|
||||
RootId: rootId,
|
||||
Message: postText,
|
||||
FileIds: fileIds}
|
||||
rpost, err2 := cfg.client.CreatePost(post)
|
||||
if err2 != nil {
|
||||
rpost, resp := cfg.client.CreatePost(post)
|
||||
if resp != nil && resp.Error != nil {
|
||||
return nil, false
|
||||
}
|
||||
return rpost, true
|
||||
|
||||
Ссылка в новой задаче
Block a user