mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-31 10: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)
|
m.Header.Set(jetstream.UserID, userID)
|
||||||
|
|
||||||
data := eventutil.AccountData{
|
var err error
|
||||||
|
m.Data, err = json.Marshal(eventutil.AccountData{
|
||||||
RoomID: roomID,
|
RoomID: roomID,
|
||||||
Type: dataType,
|
Type: dataType,
|
||||||
}
|
})
|
||||||
var err error
|
|
||||||
m.Data, err = json.Marshal(data)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,8 @@ func (s *OutputNotificationDataConsumer) onMessage(ctx context.Context, msg *nat
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"user_id": userID,
|
"user_id": userID,
|
||||||
"room_id": data.RoomID,
|
"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)
|
s.stream.Advance(streamPos)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue