aboutsummaryrefslogtreecommitdiff
path: root/service/transport.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/transport.go')
-rw-r--r--service/transport.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/service/transport.go b/service/transport.go
index 42b371a..a7912e6 100644
--- a/service/transport.go
+++ b/service/transport.go
@@ -406,7 +406,13 @@ func NewHandler(s *service, logger *log.Logger, staticDir string) http.Handler {
mute := handle(func(c *client) error {
id, _ := mux.Vars(c.r)["id"]
- err := s.Mute(c, id)
+ q := c.r.URL.Query()
+ var notifications *bool
+ if r, ok := q["notifications"]; ok && len(r) > 0 {
+ notifications = new(bool)
+ *notifications = r[0] == "true"
+ }
+ err := s.Mute(c, id, notifications)
if err != nil {
return err
}