Set batched notification email timestamps to user TZ (#26121)
* refactor: migrate getFormattedPostTime to utils Move app.getFormattedPostTime to utils and export along with its struct * Set batch notification post times to user TZ * default useMilitaryTime to false in batched email If there is an error reading the user's preference for useMilitaryTime, default to false, as that should be the default value if the user never sets it. --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -18,6 +18,7 @@ import (
|
||||
"github.com/mattermost/mattermost/server/public/shared/i18n"
|
||||
"github.com/mattermost/mattermost/server/public/shared/timezones"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/store/storetest/mocks"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/utils"
|
||||
)
|
||||
|
||||
func TestGetDirectMessageNotificationEmailSubject(t *testing.T) {
|
||||
@@ -255,7 +256,7 @@ func TestGetNotificationEmailBodyFullNotificationLocaleTimeNoTimezone(t *testing
|
||||
tm := time.Unix(post.CreateAt/1000, 0)
|
||||
zone, _ := tm.Zone()
|
||||
|
||||
formattedTime := formattedPostTime{
|
||||
formattedTime := utils.FormattedPostTime{
|
||||
Hour: fmt.Sprintf("%02d", tm.Hour()),
|
||||
Minute: fmt.Sprintf("%02d", tm.Minute()),
|
||||
TimeZone: zone,
|
||||
|
||||
Ссылка в новой задаче
Block a user