Don't try to populate map that doesn't exist

This commit is contained in:
Neil Alexander 2021-11-03 14:33:52 +00:00
parent dd7f69ffc3
commit 15d44cd707
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -110,7 +110,9 @@ func (r *Inputer) InputRoomEvents(
func (r *Inputer) WriteOutputEvents(roomID string, updates []api.OutputEvent) error { func (r *Inputer) WriteOutputEvents(roomID string, updates []api.OutputEvent) error {
var err error var err error
for _, update := range updates { for _, update := range updates {
msg := &nats.Msg{} msg := &nats.Msg{
Header: nats.Header{},
}
msg.Header.Set(jetstream.RoomID, roomID) msg.Header.Set(jetstream.RoomID, roomID)
msg.Data, err = json.Marshal(update) msg.Data, err = json.Marshal(update)
if err != nil { if err != nil {