Fix incorrect error check

This commit is contained in:
Neil Alexander 2022-02-02 15:52:02 +00:00
parent f58ee67a7a
commit f49f4e55e0
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -157,7 +157,7 @@ func (r *Inputer) processRoomEventUsingUpdater(
}
commit, err := r.processRoomEvent(ctx, updater, inputRoomEvent)
if commit {
if cerr := updater.Commit(); err != nil {
if cerr := updater.Commit(); cerr != nil {
return true, fmt.Errorf("updater.Commit: %w", cerr)
}
} else {