MM-38132: Improve Auto Responder logic (#18264)

We properly truncate the date part from the createAt time.

The SQL query is improved now to directly return the bool.

Fixed the test to properly test the feature.

https://mattermost.atlassian.net/browse/MM-38132

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2021-08-30 23:06:45 +05:30
коммит произвёл GitHub
родитель 71a811e993
Коммит 5b8720d539
4 изменённых файлов: 36 добавлений и 30 удалений

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

@@ -3145,6 +3145,8 @@ func testHasAutoResponsePostByUserSince(t *testing.T, ss store.Store) {
Message: "message",
})
require.NoError(t, err)
// We need to sleep because SendAutoResponseIfNecessary
// runs in a goroutine.
time.Sleep(time.Millisecond)
post2, err := ss.Post().Save(&model.Post{