aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-03-01 16:17:28 +0200
committerGitHub <noreply@github.com>2020-03-01 16:17:28 +0200
commitda4a2c670d9c1f399ad87ddbc109445f2d974edb (patch)
tree4f2ef0d6bb70399a8292f53841f47c26f3236f73 /ui
parent3658e60d89dfd9f15cb89a4ed0b8e3bda4dec551 (diff)
parent8deeec6f8d52d1d5cbaca0895fc275b175e3aeee (diff)
Merge pull request #111 from Evidlo/master
add notify_sound config option
Diffstat (limited to 'ui')
-rw-r--r--ui/view-main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/view-main.go b/ui/view-main.go
index 30fa982..172e29f 100644
--- a/ui/view-main.go
+++ b/ui/view-main.go
@@ -431,7 +431,9 @@ func (view *MainView) NotifyMessage(room *rooms.Room, message ifc.Message, shoul
if shouldNotify && !recentlyFocused {
// Push rules say notify and the terminal is not focused, send desktop notification.
- shouldPlaySound := should.PlaySound && should.SoundName == "default"
+ shouldPlaySound := should.PlaySound &&
+ should.SoundName == "default" &&
+ view.config.NotifySound
sendNotification(room, message.NotificationSenderName(), message.NotificationContent(), should.Highlight, shouldPlaySound)
}