Thread autoresponse posts with the post they are autoresponding to (#15625)

* Thread autoresponse posts with the post they are autoresponding to

* Remove unneeded if

* Remove ParentID references

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Daniel Espino García
2020-10-23 16:21:21 +02:00
коммит произвёл GitHub
родитель 8c63eb7232
Коммит 910de96a33
5 изменённых файлов: 112 добавлений и 29 удалений

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

@@ -451,7 +451,7 @@ func (a *App) handlePostEvents(post *model.Post, user *model.User, channel *mode
if post.Type != model.POST_AUTO_RESPONDER { // don't respond to an auto-responder
a.Srv().Go(func() {
_, err := a.SendAutoResponseIfNecessary(channel, user)
_, err := a.SendAutoResponseIfNecessary(channel, user, post)
if err != nil {
mlog.Error("Failed to send auto response", mlog.String("user_id", user.Id), mlog.String("post_id", post.Id), mlog.Err(err))
}