mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-12 15:17:16 +03:00
message.go: stripping emoji for when no theme is set
This commit is contained in:
parent
68e9d6880d
commit
1102162d1f
@ -191,10 +191,11 @@ func (m PrivateMsg) From() *User {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m PrivateMsg) Render(t *Theme) string {
|
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 {
|
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)
|
return t.ColorPM(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user