mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-22 05:23:09 -06:00
Various typos and whitespace cleanup
This commit is contained in:
parent
4626f6c9d8
commit
75bc8ab826
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// PerformRelayServerSync implements api.FederationInternalAPI
|
||||
// PerformRelayServerSync implements api.RelayInternalAPI
|
||||
func (r *RelayInternalAPI) PerformRelayServerSync(
|
||||
ctx context.Context,
|
||||
request *api.PerformRelayServerSyncRequest,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ func TestRelayAPIClientNil(t *testing.T) {
|
|||
assert.Error(t, err)
|
||||
}
|
||||
|
||||
func TestRelayAPIClientPerormSync(t *testing.T) {
|
||||
func TestRelayAPIClientPerformSync(t *testing.T) {
|
||||
// Start a local HTTP server
|
||||
server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
|
||||
assert.Equal(t, "/api"+RelayAPIPerformRelayServerSyncPath, req.URL.String())
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@ type Database struct {
|
|||
}
|
||||
|
||||
func (d *Database) StoreTransaction(
|
||||
ctx context.Context, txn gomatrixserverlib.Transaction,
|
||||
ctx context.Context, transaction gomatrixserverlib.Transaction,
|
||||
) (*shared.Receipt, error) {
|
||||
var err error
|
||||
json, err := json.Marshal(txn)
|
||||
json, err := json.Marshal(transaction)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("d.JSONUnmarshall: %w", err)
|
||||
return nil, fmt.Errorf("failed to marshal: %w", err)
|
||||
}
|
||||
|
||||
var nid int64
|
||||
|
|
@ -83,7 +83,6 @@ func (d *Database) CleanTransactions(
|
|||
userID gomatrixserverlib.UserID,
|
||||
receipts []*shared.Receipt,
|
||||
) error {
|
||||
println(len(receipts))
|
||||
nids := make([]int64, len(receipts))
|
||||
for i, receipt := range receipts {
|
||||
nids[i] = receipt.GetNID()
|
||||
|
|
@ -132,7 +131,7 @@ func (d *Database) GetTransaction(
|
|||
transaction := &gomatrixserverlib.Transaction{}
|
||||
err = json.Unmarshal(txns[nids[0]], transaction)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("Unmarshall transaction: %w", err)
|
||||
return nil, nil, fmt.Errorf("Unmarshal transaction: %w", err)
|
||||
}
|
||||
|
||||
receipt := shared.NewReceipt(nids[0])
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ relay_api:
|
|||
connection_string: file:relayapi.db
|
||||
mscs:
|
||||
database:
|
||||
connection_string: file:federationapi.db
|
||||
connection_string: file:mscs.db
|
||||
tracing:
|
||||
enabled: false
|
||||
jaeger:
|
||||
|
|
|
|||
Loading…
Reference in a new issue