Skip to content

Commit 25689a8

Browse files
committed
chat: Emit BEL when receiving a PM.
Also get rid of extraneous SetReplyTo which was not getting set before because we were switching on the wrong type. Closes #207 CC @sleibrock
1 parent 227dad7 commit 25689a8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

chat/message/user.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,10 @@ func (u *User) render(m Message) string {
154154
switch m := m.(type) {
155155
case PublicMsg:
156156
return m.RenderFor(cfg) + Newline
157-
case PrivateMsg:
158-
u.SetReplyTo(m.From())
157+
case *PrivateMsg:
158+
if cfg.Bell {
159+
return m.Render(cfg.Theme) + Bel + Newline
160+
}
159161
return m.Render(cfg.Theme) + Newline
160162
default:
161163
return m.Render(cfg.Theme) + Newline

0 commit comments

Comments
 (0)