From a5bccfd2f9aa1ffecb0f45942ed773d18d8fd0fa Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 22 Jan 2020 10:37:42 +0000 Subject: [PATCH] Some updates based on review comments from @babolivier --- syncapi/storage/postgres/syncserver.go | 1 - syncapi/sync/request.go | 7 ------- 2 files changed, 8 deletions(-) diff --git a/syncapi/storage/postgres/syncserver.go b/syncapi/storage/postgres/syncserver.go index c1135bf90..07af77ab2 100644 --- a/syncapi/storage/postgres/syncserver.go +++ b/syncapi/storage/postgres/syncserver.go @@ -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, diff --git a/syncapi/sync/request.go b/syncapi/sync/request.go index 4d0bd155d..f2e199d23 100644 --- a/syncapi/sync/request.go +++ b/syncapi/sync/request.go @@ -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