mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 00:03:09 -06:00
Use fmt.Errorf instead of pkg/errors
This commit is contained in:
parent
fbd3fc626b
commit
8012204000
|
|
@ -21,8 +21,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
|
|
||||||
eduAPI "github.com/matrix-org/dendrite/eduserver/api"
|
eduAPI "github.com/matrix-org/dendrite/eduserver/api"
|
||||||
userapi "github.com/matrix-org/dendrite/userapi/api"
|
userapi "github.com/matrix-org/dendrite/userapi/api"
|
||||||
|
|
||||||
|
|
@ -623,7 +621,7 @@ func (d *Database) addEDUDeltaToResponse(
|
||||||
if fromPos.EDUPosition() != toPos.EDUPosition() {
|
if fromPos.EDUPosition() != toPos.EDUPosition() {
|
||||||
// add typing deltas
|
// add typing deltas
|
||||||
if err := d.addTypingDeltaToResponse(fromPos, joinedRoomIDs, res); err != nil {
|
if err := d.addTypingDeltaToResponse(fromPos, joinedRoomIDs, res); err != nil {
|
||||||
return errors.Wrap(err, "unable to apply typing delta to response")
|
return fmt.Errorf("unable to apply typing delta to response: %w")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -631,7 +629,7 @@ func (d *Database) addEDUDeltaToResponse(
|
||||||
if (fromPos.EDUPosition() == 0 && toPos.EDUPosition() == 0) ||
|
if (fromPos.EDUPosition() == 0 && toPos.EDUPosition() == 0) ||
|
||||||
fromPos.EDUPosition() != toPos.EDUPosition() {
|
fromPos.EDUPosition() != toPos.EDUPosition() {
|
||||||
if err := d.addReceiptDeltaToResponse(fromPos, joinedRoomIDs, res); err != nil {
|
if err := d.addReceiptDeltaToResponse(fromPos, joinedRoomIDs, res); err != nil {
|
||||||
return errors.Wrap(err, "unable to apply receipts to response")
|
return fmt.Errorf("unable to apply receipts to response: %w")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue