mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-23 12:37:23 +00:00
Better attachment handling after PR to samhofi.us/x/keybase
This commit is contained in:
2
main.go
2
main.go
@ -365,7 +365,7 @@ func formatOutput(api keybase.ChatAPI) string {
|
||||
msg = colorRegex(msg, `(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*))`, messageLinkColor, messageBodyColor)
|
||||
msg = colorText(colorReplaceMentionMe(msg, messageBodyColor), messageBodyColor, c)
|
||||
if msgType == "attachment" {
|
||||
msg = fmt.Sprintf("%s", colorText("[Attachment]", messageAttachmentColor, c))
|
||||
msg = fmt.Sprintf("%s\n%s", api.Msg.Content.Attachment.Object.Title, colorText(fmt.Sprintf("[Attachment: %s]", api.Msg.Content.Attachment.Object.Filename), messageAttachmentColor, c))
|
||||
}
|
||||
user := colorUsername(api.Msg.Sender.Username, c)
|
||||
device := colorText(api.Msg.Sender.DeviceName, messageSenderDeviceColor, c)
|
||||
|
||||
Reference in New Issue
Block a user