mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-07-21 10:52:00 +03:00
Compare commits
No commits in common. "748fc819e76f643a141429f877e14457e12627b8" and "4b4270f0ca2ff763192e4f3a5a1ece05691f9842" have entirely different histories.
748fc819e7
...
4b4270f0ca
@ -191,11 +191,10 @@ func (m PrivateMsg) From() *User {
|
||||
}
|
||||
|
||||
func (m PrivateMsg) Render(t *Theme) string {
|
||||
format := "[PM from %s] %s"
|
||||
s := fmt.Sprintf("[PM from %s] %s", m.from.Name(), m.body)
|
||||
if t == nil {
|
||||
return fmt.Sprintf(format, m.from.ID(), m.body)
|
||||
return s
|
||||
}
|
||||
s := fmt.Sprintf(format, m.from.Name(), m.body)
|
||||
return t.ColorPM(s)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user