mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-22 08:47:24 +00:00
Bugfix: Show user device instead of username twice, and show date post coloring
This commit is contained in:
3
main.go
3
main.go
@ -159,7 +159,7 @@ func formatOutput(api keybase.ChatAPI) string {
|
||||
}
|
||||
|
||||
user := colorUsername(api.Msg.Sender.Username, c)
|
||||
device := colorText(api.Msg.Sender.Username, messageSenderDeviceColor, 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)
|
||||
ret = strings.Replace(ret, "$MSG", msg, 1)
|
||||
@ -167,6 +167,7 @@ func formatOutput(api keybase.ChatAPI) string {
|
||||
ret = strings.Replace(ret, "$DEVICE", device, 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, "```", fmt.Sprintf("\n<code>\n"), -1)
|
||||
}
|
||||
return ret
|
||||
|
||||
Reference in New Issue
Block a user