From 80d2f79379f0d6ba62a383e6910b0014335a7e9b Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Thu, 17 Oct 2019 10:32:08 -0400 Subject: [PATCH] Color date same as time for users who separate the two --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 82cc72b..914f8f5 100644 --- a/main.go +++ b/main.go @@ -368,14 +368,14 @@ func formatOutput(api keybase.ChatAPI) string { user := colorUsername(api.Msg.Sender.Username, c) device := colorText(api.Msg.Sender.DeviceName, messageSenderDeviceColor, c) - msgId := colorText(fmt.Sprintf("%d", api.Msg.ID), messageIdColor, c) - ts := colorText(fmt.Sprintf("%s", tm.Format(timeFormat)), messageTimeColor, c) + msgID := colorText(fmt.Sprintf("%d", api.Msg.ID), messageIdColor, c) + ts := colorText(tm.Format(timeFormat), messageTimeColor, c) ret = strings.Replace(ret, "$MSG", msg, 1) ret = strings.Replace(ret, "$USER", user, 1) ret = strings.Replace(ret, "$DEVICE", device, 1) - ret = strings.Replace(ret, "$ID", msgId, 1) + ret = strings.Replace(ret, "$ID", msgID, 1) ret = strings.Replace(ret, "$TIME", ts, 1) - ret = strings.Replace(ret, "$DATE", fmt.Sprintf("%s", tm.Format(dateFormat)), 1) + ret = strings.Replace(ret, "$DATE", colorText(tm.Format(dateFormat), messageTimeColor, c), 1) ret = strings.Replace(ret, "```", fmt.Sprintf("\n\n"), -1) } return ret