|
@@ -143,13 +143,13 @@ func (mt *MessagesText) createMsg(msg discord.Message) {
|
|
|
|
|
|
|
|
func (mt *MessagesText) drawTimestamps(ts discord.Timestamp) {
|
|
func (mt *MessagesText) drawTimestamps(ts discord.Timestamp) {
|
|
|
time := ts.Time().In(time.Local).Format(mt.cfg.Timestamps.Format)
|
|
time := ts.Time().In(time.Local).Format(mt.cfg.Timestamps.Format)
|
|
|
- fmt.Fprintf(mt, "[::d]%s[::-] ", time)
|
|
|
|
|
|
|
+ fmt.Fprintf(mt, "[::d]%s[::D] ", time)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (mt *MessagesText) drawAuthor(msg discord.Message) {
|
|
func (mt *MessagesText) drawAuthor(msg discord.Message) {
|
|
|
name := mt.authorName(msg.Author, msg.GuildID)
|
|
name := mt.authorName(msg.Author, msg.GuildID)
|
|
|
color := mt.authorColor(msg.Author, msg.GuildID)
|
|
color := mt.authorColor(msg.Author, msg.GuildID)
|
|
|
- fmt.Fprintf(mt, "[%s]%s[-:-:-] ", color, name)
|
|
|
|
|
|
|
+ fmt.Fprintf(mt, "[%s]%s[-] ", color, name)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (mt *MessagesText) drawContent(msg discord.Message) {
|
|
func (mt *MessagesText) drawContent(msg discord.Message) {
|
|
@@ -167,7 +167,7 @@ func (mt *MessagesText) createDefaultMsg(msg discord.Message) {
|
|
|
mt.drawContent(msg)
|
|
mt.drawContent(msg)
|
|
|
|
|
|
|
|
if msg.EditedTimestamp.IsValid() {
|
|
if msg.EditedTimestamp.IsValid() {
|
|
|
- io.WriteString(mt, " [::d](edited)[::-]")
|
|
|
|
|
|
|
+ io.WriteString(mt, " [::d](edited)[::D]")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
for _, a := range msg.Attachments {
|
|
for _, a := range msg.Attachments {
|
|
@@ -183,9 +183,10 @@ func (mt *MessagesText) createDefaultMsg(msg discord.Message) {
|
|
|
func (mt *MessagesText) createReplyMsg(msg discord.Message) {
|
|
func (mt *MessagesText) createReplyMsg(msg discord.Message) {
|
|
|
// reply
|
|
// reply
|
|
|
fmt.Fprintf(mt, "[::d]%s ", mt.cfg.Theme.MessagesText.ReplyIndicator)
|
|
fmt.Fprintf(mt, "[::d]%s ", mt.cfg.Theme.MessagesText.ReplyIndicator)
|
|
|
- if msg.ReferencedMessage != nil {
|
|
|
|
|
- mt.drawAuthor(*msg.ReferencedMessage)
|
|
|
|
|
- mt.drawContent(*msg.ReferencedMessage)
|
|
|
|
|
|
|
+ if refMsg := msg.ReferencedMessage; refMsg != nil {
|
|
|
|
|
+ refMsg.GuildID = msg.GuildID
|
|
|
|
|
+ mt.drawAuthor(*refMsg)
|
|
|
|
|
+ mt.drawContent(*refMsg)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
io.WriteString(mt, tview.NewLine)
|
|
io.WriteString(mt, tview.NewLine)
|