Skip to content

Commit

Permalink
chat: Emit BEL when receiving a PM.
Browse files Browse the repository at this point in the history
Also get rid of extraneous SetReplyTo which was not getting set before because we were switching on the wrong type.

Closes #207
CC @sleibrock
  • Loading branch information
shazow committed May 11, 2017
1 parent 227dad7 commit 25689a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chat/message/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,10 @@ func (u *User) render(m Message) string {
switch m := m.(type) {
case PublicMsg:
return m.RenderFor(cfg) + Newline
case PrivateMsg:
u.SetReplyTo(m.From())
case *PrivateMsg:
if cfg.Bell {
return m.Render(cfg.Theme) + Bel + Newline
}
return m.Render(cfg.Theme) + Newline
default:
return m.Render(cfg.Theme) + Newline
Expand Down

0 comments on commit 25689a8

Please sign in to comment.