mirror of
https://github.com/shazow/ssh-chat.git
synced 2026-10-22 23:52:12 +03:00
message.go: stripping emoji for when no theme is set
This commit is contained in:
1 parent
68e9d6880d
commit
1102162d1f
1 file changed
+3
-2
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user