Don't panic, NAK instead

This commit is contained in:
Neil Alexander 2022-02-10 15:52:38 +00:00
parent 8d5426a11d
commit 23d175de77
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 5 additions and 5 deletions

View file

@ -41,12 +41,11 @@ func (p *SyncAPI) SendAccountData(userID string, roomID string, dataType string)
}
m.Header.Set(jetstream.UserID, userID)
data := eventutil.AccountData{
var err error
m.Data, err = json.Marshal(eventutil.AccountData{
RoomID: roomID,
Type: dataType,
}
var err error
m.Data, err = json.Marshal(data)
})
if err != nil {
return err
}

View file

@ -93,7 +93,8 @@ func (s *OutputNotificationDataConsumer) onMessage(ctx context.Context, msg *nat
log.WithFields(log.Fields{
"user_id": userID,
"room_id": data.RoomID,
}).WithError(err).Panic("Could not save notification counts")
}).WithError(err).Error("Could not save notification counts")
return false
}
s.stream.Advance(streamPos)