mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-07-19 18:02:03 +03:00
Compare commits
2 Commits
4b4270f0ca
...
748fc819e7
Author | SHA1 | Date | |
---|---|---|---|
|
748fc819e7 | ||
|
1102162d1f |
@ -191,10 +191,11 @@ func (m PrivateMsg) From() *User {
|
||||
}
|
||||
|
||||
func (m PrivateMsg) Render(t *Theme) string {
|
||||
s := fmt.Sprintf("[PM from %s] %s", m.from.Name(), m.body)
|
||||
format := "[PM from %s] %s"
|
||||
if t == nil {
|
||||
return s
|
||||
return fmt.Sprintf(format, m.from.ID(), m.body)
|
||||
}
|
||||
s := fmt.Sprintf(format, m.from.Name(), m.body)
|
||||
return t.ColorPM(s)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user