Better time truncation for stream notifications.

This commit is contained in:
Asaf Gartner 2022-10-13 19:58:28 +03:00
parent 56929e6e44
commit d7f1325ace
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ func PostStreamHistory(ctx context.Context, history *models.TwitchStreamHistory)
if history.EndApproximated {
approximated = "about "
}
duration := history.EndedAt.Sub(history.StartedAt).Truncate(time.Minute).String()
duration := history.EndedAt.Sub(history.StartedAt).Truncate(time.Second).String()
messageContent := fmt.Sprintf(
":o: **%s** was live: https://twitch.tv/%s\n> _%s_\nOn <t:%d:F> for %s%s",
history.TwitchLogin,