From 15d44cd70770fde876d6cdcbe868063745f54887 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 3 Nov 2021 14:33:52 +0000 Subject: [PATCH] Don't try to populate map that doesn't exist --- roomserver/internal/input/input.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roomserver/internal/input/input.go b/roomserver/internal/input/input.go index 0aefbc182..42d38082f 100644 --- a/roomserver/internal/input/input.go +++ b/roomserver/internal/input/input.go @@ -110,7 +110,9 @@ func (r *Inputer) InputRoomEvents( func (r *Inputer) WriteOutputEvents(roomID string, updates []api.OutputEvent) error { var err error for _, update := range updates { - msg := &nats.Msg{} + msg := &nats.Msg{ + Header: nats.Header{}, + } msg.Header.Set(jetstream.RoomID, roomID) msg.Data, err = json.Marshal(update) if err != nil {