mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-29 09:43:10 -06:00
Don't panic, NAK instead
This commit is contained in:
parent
8d5426a11d
commit
23d175de77
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue