Skip to content

Commit

Permalink
Fix raw endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Heckel committed Nov 2, 2021
1 parent b775e6d commit 0e9fa1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func (s *Server) handleSubscribeSSE(w http.ResponseWriter, r *http.Request, v *v

func (s *Server) handleSubscribeRaw(w http.ResponseWriter, r *http.Request, v *visitor) error {
encoder := func(msg *message) (string, error) {
if msg.Event == "" { // only handle default events
if msg.Event == messageEvent { // only handle default events
return strings.ReplaceAll(msg.Message, "\n", " ") + "\n", nil
}
return "\n", nil // "keepalive" and "open" events just send an empty line
Expand Down

0 comments on commit 0e9fa1c

Please sign in to comment.