mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 00:03:09 -06:00
Make golangci-lint happy
This commit is contained in:
parent
a3ac1c644e
commit
eda7ace3f8
|
|
@ -30,6 +30,7 @@ import (
|
|||
)
|
||||
|
||||
const receiptsSchema = `
|
||||
CREATE SEQUENCE IF NOT EXISTS syncapi_stream_id;
|
||||
-- Stores data about receipts
|
||||
CREATE TABLE IF NOT EXISTS syncapi_receipts (
|
||||
-- The ID
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ type SyncServerDatasource struct {
|
|||
sqlutil.PartitionOffsetStatements
|
||||
}
|
||||
|
||||
const createSequence = "CREATE SEQUENCE IF NOT EXISTS syncapi_stream_id;"
|
||||
|
||||
// NewDatabase creates a new sync server database
|
||||
func NewDatabase(dbProperties *config.DatabaseOptions) (*SyncServerDatasource, error) {
|
||||
var d SyncServerDatasource
|
||||
|
|
|
|||
|
|
@ -621,7 +621,7 @@ func (d *Database) addEDUDeltaToResponse(
|
|||
if fromPos.EDUPosition() != toPos.EDUPosition() {
|
||||
// add typing deltas
|
||||
if err := d.addTypingDeltaToResponse(fromPos, joinedRoomIDs, res); err != nil {
|
||||
return fmt.Errorf("unable to apply typing delta to response: %w")
|
||||
return fmt.Errorf("unable to apply typing delta to response: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -629,7 +629,7 @@ func (d *Database) addEDUDeltaToResponse(
|
|||
if (fromPos.EDUPosition() == 0 && toPos.EDUPosition() == 0) ||
|
||||
fromPos.EDUPosition() != toPos.EDUPosition() {
|
||||
if err := d.addReceiptDeltaToResponse(fromPos, joinedRoomIDs, res); err != nil {
|
||||
return fmt.Errorf("unable to apply receipts to response: %w")
|
||||
return fmt.Errorf("unable to apply receipts to response: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue