* Use flags for create post

* Remove unintended file

* Fix unintended change and types

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Daniel Espino García
2024-10-22 16:00:26 +02:00
коммит произвёл GitHub
родитель 43a06d1b78
Коммит 2d96053012
31 изменённых файлов: 293 добавлений и 288 удалений

Просмотреть файл

@@ -103,7 +103,7 @@ func TestSendAutoResponseIfNecessary(t *testing.T) {
Message: NewTestId(),
UserId: th.BasicUser.Id},
th.BasicChannel,
false, true)
model.CreatePostFlags{SetOnline: true})
sent, err := th.App.SendAutoResponseIfNecessary(th.Context, channel, th.BasicUser, savedPost)
@@ -133,7 +133,7 @@ func TestSendAutoResponseIfNecessary(t *testing.T) {
Message: NewTestId(),
UserId: th.BasicUser.Id},
th.BasicChannel,
false, true)
model.CreatePostFlags{SetOnline: true})
sent, err := th.App.SendAutoResponseIfNecessary(th.Context, channel, th.BasicUser, savedPost)
@@ -150,7 +150,7 @@ func TestSendAutoResponseIfNecessary(t *testing.T) {
Message: NewTestId(),
UserId: th.BasicUser.Id},
th.BasicChannel,
false, true)
model.CreatePostFlags{SetOnline: true})
sent, err := th.App.SendAutoResponseIfNecessary(th.Context, th.BasicChannel, th.BasicUser, savedPost)
@@ -190,7 +190,7 @@ func TestSendAutoResponseIfNecessary(t *testing.T) {
Message: NewTestId(),
UserId: botUser.Id},
th.BasicChannel,
false, true)
model.CreatePostFlags{SetOnline: true})
sent, err := th.App.SendAutoResponseIfNecessary(th.Context, channel, botUser, savedPost)
@@ -228,7 +228,7 @@ func TestSendAutoResponseIfNecessary(t *testing.T) {
Type: model.PostTypeAutoResponder,
},
th.BasicChannel,
false, true)
model.CreatePostFlags{SetOnline: true})
require.Nil(t, err)
savedPost.CreateAt = model.GetMillisForTime(time.Now())
@@ -259,7 +259,7 @@ func TestSendAutoResponseSuccess(t *testing.T) {
Message: "zz" + model.NewId() + "a",
UserId: th.BasicUser.Id},
th.BasicChannel,
false, true)
model.CreatePostFlags{SetOnline: true})
sent, err := th.App.SendAutoResponse(th.Context, th.BasicChannel, userUpdated1, savedPost)
@@ -299,7 +299,7 @@ func TestSendAutoResponseSuccessOnThread(t *testing.T) {
Message: "zz" + model.NewId() + "a",
UserId: th.BasicUser.Id},
th.BasicChannel,
false, true)
model.CreatePostFlags{SetOnline: true})
savedPost, _ := th.App.CreatePost(th.Context, &model.Post{
ChannelId: th.BasicChannel.Id,
@@ -308,7 +308,7 @@ func TestSendAutoResponseSuccessOnThread(t *testing.T) {
RootId: parentPost.Id,
},
th.BasicChannel,
false, true)
model.CreatePostFlags{SetOnline: true})
sent, err := th.App.SendAutoResponse(th.Context, th.BasicChannel, userUpdated1, savedPost)
@@ -348,7 +348,7 @@ func TestSendAutoResponseFailure(t *testing.T) {
Message: "zz" + model.NewId() + "a",
UserId: th.BasicUser.Id},
th.BasicChannel,
false, true)
model.CreatePostFlags{SetOnline: true})
sent, err := th.App.SendAutoResponse(th.Context, th.BasicChannel, userUpdated1, savedPost)