From 0e9fa1c4dc8850b48ce6d809baa18d49403f6e84 Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Tue, 2 Nov 2021 14:10:56 -0400 Subject: [PATCH] Fix raw endpoint --- server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/server.go b/server/server.go index dcee296..1682ca3 100644 --- a/server/server.go +++ b/server/server.go @@ -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