mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 03:13:11 -06:00
Some updates based on review comments from @babolivier
This commit is contained in:
parent
f09c1d8b58
commit
a5bccfd2f9
|
|
@ -155,7 +155,6 @@ func (d *SyncServerDatasource) handleBackwardExtremities(ctx context.Context, ev
|
|||
// WriteEvent into the database. It is not safe to call this function from multiple goroutines, as it would create races
|
||||
// when generating the sync stream position for this event. Returns the sync stream position for the inserted event.
|
||||
// Returns an error if there was a problem inserting this event.
|
||||
// nolint: gocyclo
|
||||
func (d *SyncServerDatasource) WriteEvent(
|
||||
ctx context.Context,
|
||||
ev *gomatrixserverlib.Event,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ package sync
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
|
@ -31,12 +30,6 @@ import (
|
|||
const defaultSyncTimeout = time.Duration(0)
|
||||
const defaultTimelineLimit = 20
|
||||
|
||||
var (
|
||||
// ErrNotStreamToken is returned if a pagination token isn't of type
|
||||
// types.PaginationTokenTypeStream
|
||||
ErrNotStreamToken = fmt.Errorf("The provided pagination token has the wrong prefix (should be s)")
|
||||
)
|
||||
|
||||
// syncRequest represents a /sync request, with sensible defaults/sanity checks applied.
|
||||
type syncRequest struct {
|
||||
ctx context.Context
|
||||
|
|
|
|||
Loading…
Reference in a new issue