From a85051ca9de82756a94f1ea6870de9bd140a6b20 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Mon, 21 Dec 2020 14:27:01 +0000 Subject: [PATCH] fix imports (#1665) * fix imports Signed-off-by: 6543 <6543@obermui.de> * add sqlite driver import back Signed-off-by: 6543 <6543@obermui.de> * rm import of userapi/storage/accounts/sqlite3/storage.go --- syncapi/consumers/roomserver.go | 5 ++--- syncapi/storage/shared/syncserver.go | 3 +-- userapi/storage/accounts/sqlite3/storage.go | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/syncapi/consumers/roomserver.go b/syncapi/consumers/roomserver.go index 3b1f1582a..399f67ba8 100644 --- a/syncapi/consumers/roomserver.go +++ b/syncapi/consumers/roomserver.go @@ -27,7 +27,6 @@ import ( "github.com/matrix-org/dendrite/syncapi/sync" "github.com/matrix-org/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib" - "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus" ) @@ -177,7 +176,7 @@ func (s *OutputRoomEventConsumer) onNewRoomEvent( } if pduPos, err = s.notifyJoinedPeeks(ctx, ev, pduPos); err != nil { - logrus.WithError(err).Errorf("Failed to notifyJoinedPeeks for PDU pos %d", pduPos) + log.WithError(err).Errorf("Failed to notifyJoinedPeeks for PDU pos %d", pduPos) return err } @@ -216,7 +215,7 @@ func (s *OutputRoomEventConsumer) onOldRoomEvent( } if pduPos, err = s.notifyJoinedPeeks(ctx, ev, pduPos); err != nil { - logrus.WithError(err).Errorf("Failed to notifyJoinedPeeks for PDU pos %d", pduPos) + log.WithError(err).Errorf("Failed to notifyJoinedPeeks for PDU pos %d", pduPos) return err } diff --git a/syncapi/storage/shared/syncserver.go b/syncapi/storage/shared/syncserver.go index 128aaa5b7..ba9403a53 100644 --- a/syncapi/storage/shared/syncserver.go +++ b/syncapi/storage/shared/syncserver.go @@ -31,7 +31,6 @@ import ( "github.com/matrix-org/dendrite/syncapi/storage/tables" "github.com/matrix-org/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib" - "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus" ) @@ -1150,7 +1149,7 @@ func (d *Database) fetchMissingStateEvents( return nil, err } if len(stateEvents) != len(missing) { - logrus.WithContext(ctx).Warnf("Failed to map all event IDs to events (got %d, wanted %d)", len(stateEvents), len(missing)) + log.WithContext(ctx).Warnf("Failed to map all event IDs to events (got %d, wanted %d)", len(stateEvents), len(missing)) // TODO: Why is this happening? It's probably the roomserver. Uncomment // this error again when we work out what it is and fix it, otherwise we diff --git a/userapi/storage/accounts/sqlite3/storage.go b/userapi/storage/accounts/sqlite3/storage.go index 2b621c4ca..92c1c669e 100644 --- a/userapi/storage/accounts/sqlite3/storage.go +++ b/userapi/storage/accounts/sqlite3/storage.go @@ -29,7 +29,6 @@ import ( "github.com/matrix-org/dendrite/userapi/storage/accounts/sqlite3/deltas" "github.com/matrix-org/gomatrixserverlib" "golang.org/x/crypto/bcrypt" - // Import the sqlite3 database driver. ) // Database represents an account database