Debian Codegraph @

server/server_webpush_dummy.go

raw
1 //go:build nowebpush
2
3 package server
4
5 import (
6 "net/http"
7
8 "heckel.io/ntfy/v2/model"
9 )
10
11 const (
12 // WebPushAvailable is a constant used to indicate that WebPush support is available.
13 // It can be disabled with the 'nowebpush' build tag.
14 WebPushAvailable = false
15 )
16
17 func (s *Server) handleWebPushUpdate(w http.ResponseWriter, r *http.Request, v *visitor) error {
18 return errHTTPNotFound
19 }
20
21 func (s *Server) handleWebPushDelete(w http.ResponseWriter, r *http.Request, _ *visitor) error {
22 return errHTTPNotFound
23 }
24
25 func (s *Server) publishToWebPushEndpoints(v *visitor, m *model.Message) {
26 // Nothing to see here
27 }
28
29 func (s *Server) pruneAndNotifyWebPushSubscriptions() {
30 // Nothing to see here
31 }