mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-02-12 05:54:29 -06:00
Fix bugs
This commit is contained in:
parent
2ca972ef76
commit
f58ee67a7a
|
@ -157,18 +157,15 @@ func (r *Inputer) processRoomEventUsingUpdater(
|
||||||
}
|
}
|
||||||
commit, err := r.processRoomEvent(ctx, updater, inputRoomEvent)
|
commit, err := r.processRoomEvent(ctx, updater, inputRoomEvent)
|
||||||
if commit {
|
if commit {
|
||||||
if err = updater.Commit(); err != nil {
|
if cerr := updater.Commit(); err != nil {
|
||||||
return false, fmt.Errorf("updater.Commit: %w", err)
|
return true, fmt.Errorf("updater.Commit: %w", cerr)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if rerr := updater.Rollback(); rerr != nil {
|
if rerr := updater.Rollback(); rerr != nil {
|
||||||
return true, fmt.Errorf("updater.Rollback: %w", err)
|
return true, fmt.Errorf("updater.Rollback: %w", rerr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err != nil {
|
return false, err
|
||||||
return true, err
|
|
||||||
}
|
|
||||||
return false, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// InputRoomEvents implements api.RoomserverInternalAPI
|
// InputRoomEvents implements api.RoomserverInternalAPI
|
||||||
|
|
Loading…
Reference in a new issue