From 8a173437f9a4c381641aa296bfa4f367159cd58c Mon Sep 17 00:00:00 2001 From: SUMUKHA-PK Date: Mon, 14 Oct 2019 15:55:34 +0530 Subject: [PATCH] Aligning to master --- cmd/dendrite-monolith-server/main.go | 11 +-- .../encryptoapi.go | 0 .../routing/keys.go | 0 .../routing/routing.go | 0 .../storage/encrypt_algorithm.go | 0 .../storage/encrypt_keys_table.go | 0 .../storage/storage.go | 0 .../types/claim.go | 0 .../types/query.go | 0 .../types/storage.go | 0 .../types/upload.go | 0 .../dendrite/syncapi/routing/std.go | 89 ------------------- syncapi/routing/routing.go | 24 +++-- syncapi/routing/std.go | 89 +++++++++++++++++++ .../storage/send_to_device_table.go | 0 syncapi/storage/syncserver.go | 46 ++++------ .../syncapi => syncapi}/sync/keyextension.go | 0 syncapi/sync/requestpool.go | 15 +--- syncapi/syncapi.go | 5 +- 19 files changed, 123 insertions(+), 156 deletions(-) rename {src/github.com/matrix-org/dendrite/encryptoapi => encryptoapi}/encryptoapi.go (100%) rename {src/github.com/matrix-org/dendrite/encryptoapi => encryptoapi}/routing/keys.go (100%) rename {src/github.com/matrix-org/dendrite/encryptoapi => encryptoapi}/routing/routing.go (100%) rename {src/github.com/matrix-org/dendrite/encryptoapi => encryptoapi}/storage/encrypt_algorithm.go (100%) rename {src/github.com/matrix-org/dendrite/encryptoapi => encryptoapi}/storage/encrypt_keys_table.go (100%) rename {src/github.com/matrix-org/dendrite/encryptoapi => encryptoapi}/storage/storage.go (100%) rename {src/github.com/matrix-org/dendrite/encryptoapi => encryptoapi}/types/claim.go (100%) rename {src/github.com/matrix-org/dendrite/encryptoapi => encryptoapi}/types/query.go (100%) rename {src/github.com/matrix-org/dendrite/encryptoapi => encryptoapi}/types/storage.go (100%) rename {src/github.com/matrix-org/dendrite/encryptoapi => encryptoapi}/types/upload.go (100%) delete mode 100644 src/github.com/matrix-org/dendrite/syncapi/routing/std.go create mode 100644 syncapi/routing/std.go rename {src/github.com/matrix-org/dendrite/syncapi => syncapi}/storage/send_to_device_table.go (100%) rename {src/github.com/matrix-org/dendrite/syncapi => syncapi}/sync/keyextension.go (100%) diff --git a/cmd/dendrite-monolith-server/main.go b/cmd/dendrite-monolith-server/main.go index 6e5e7100b..1cc4d7182 100644 --- a/cmd/dendrite-monolith-server/main.go +++ b/cmd/dendrite-monolith-server/main.go @@ -18,26 +18,20 @@ import ( "flag" "net/http" -<<<<<<< HEAD:cmd/dendrite-monolith-server/main.go "github.com/matrix-org/dendrite/appservice" -======= "github.com/matrix-org/dendrite/common/keydb" "github.com/matrix-org/dendrite/common/transactions" "github.com/matrix-org/dendrite/typingserver" ->>>>>>> 8b4b3c6fc46900e9bfe5e234eda309200662b34a:src/github.com/matrix-org/dendrite/cmd/dendrite-monolith-server/main.go "github.com/matrix-org/dendrite/clientapi" "github.com/matrix-org/dendrite/common" "github.com/matrix-org/dendrite/common/basecomponent" - "github.com/matrix-org/dendrite/common/keydb" - "github.com/matrix-org/dendrite/common/transactions" "github.com/matrix-org/dendrite/federationapi" "github.com/matrix-org/dendrite/federationsender" "github.com/matrix-org/dendrite/mediaapi" "github.com/matrix-org/dendrite/publicroomsapi" "github.com/matrix-org/dendrite/roomserver" "github.com/matrix-org/dendrite/syncapi" - "github.com/matrix-org/dendrite/typingserver" "github.com/matrix-org/dendrite/typingserver/cache" "github.com/matrix-org/dendrite/encryptoapi" @@ -80,12 +74,9 @@ func main() { federationapi.SetupFederationAPIComponent(base, accountDB, deviceDB, federation, &keyRing, alias, input, query, asQuery) mediaapi.SetupMediaAPIComponent(base, deviceDB) publicroomsapi.SetupPublicRoomsAPIComponent(base, deviceDB) -<<<<<<< HEAD:cmd/dendrite-monolith-server/main.go - syncapi.SetupSyncAPIComponent(base, deviceDB, accountDB, query) -======= + // syncapi.SetupSyncAPIComponent(base, deviceDB, accountDB, query) syncapi.SetupSyncAPIComponent(base, deviceDB, accountDB, query, encryptDB) //appservice.SetupAppServiceAPIComponent(base, accountDB, deviceDB, federation, alias, query, transactions.New()) ->>>>>>> 8b4b3c6fc46900e9bfe5e234eda309200662b34a:src/github.com/matrix-org/dendrite/cmd/dendrite-monolith-server/main.go httpHandler := common.WrapHandlerInCORS(base.APIMux) diff --git a/src/github.com/matrix-org/dendrite/encryptoapi/encryptoapi.go b/encryptoapi/encryptoapi.go similarity index 100% rename from src/github.com/matrix-org/dendrite/encryptoapi/encryptoapi.go rename to encryptoapi/encryptoapi.go diff --git a/src/github.com/matrix-org/dendrite/encryptoapi/routing/keys.go b/encryptoapi/routing/keys.go similarity index 100% rename from src/github.com/matrix-org/dendrite/encryptoapi/routing/keys.go rename to encryptoapi/routing/keys.go diff --git a/src/github.com/matrix-org/dendrite/encryptoapi/routing/routing.go b/encryptoapi/routing/routing.go similarity index 100% rename from src/github.com/matrix-org/dendrite/encryptoapi/routing/routing.go rename to encryptoapi/routing/routing.go diff --git a/src/github.com/matrix-org/dendrite/encryptoapi/storage/encrypt_algorithm.go b/encryptoapi/storage/encrypt_algorithm.go similarity index 100% rename from src/github.com/matrix-org/dendrite/encryptoapi/storage/encrypt_algorithm.go rename to encryptoapi/storage/encrypt_algorithm.go diff --git a/src/github.com/matrix-org/dendrite/encryptoapi/storage/encrypt_keys_table.go b/encryptoapi/storage/encrypt_keys_table.go similarity index 100% rename from src/github.com/matrix-org/dendrite/encryptoapi/storage/encrypt_keys_table.go rename to encryptoapi/storage/encrypt_keys_table.go diff --git a/src/github.com/matrix-org/dendrite/encryptoapi/storage/storage.go b/encryptoapi/storage/storage.go similarity index 100% rename from src/github.com/matrix-org/dendrite/encryptoapi/storage/storage.go rename to encryptoapi/storage/storage.go diff --git a/src/github.com/matrix-org/dendrite/encryptoapi/types/claim.go b/encryptoapi/types/claim.go similarity index 100% rename from src/github.com/matrix-org/dendrite/encryptoapi/types/claim.go rename to encryptoapi/types/claim.go diff --git a/src/github.com/matrix-org/dendrite/encryptoapi/types/query.go b/encryptoapi/types/query.go similarity index 100% rename from src/github.com/matrix-org/dendrite/encryptoapi/types/query.go rename to encryptoapi/types/query.go diff --git a/src/github.com/matrix-org/dendrite/encryptoapi/types/storage.go b/encryptoapi/types/storage.go similarity index 100% rename from src/github.com/matrix-org/dendrite/encryptoapi/types/storage.go rename to encryptoapi/types/storage.go diff --git a/src/github.com/matrix-org/dendrite/encryptoapi/types/upload.go b/encryptoapi/types/upload.go similarity index 100% rename from src/github.com/matrix-org/dendrite/encryptoapi/types/upload.go rename to encryptoapi/types/upload.go diff --git a/src/github.com/matrix-org/dendrite/syncapi/routing/std.go b/src/github.com/matrix-org/dendrite/syncapi/routing/std.go deleted file mode 100644 index 2c35471de..000000000 --- a/src/github.com/matrix-org/dendrite/syncapi/routing/std.go +++ /dev/null @@ -1,89 +0,0 @@ -package routing - -import ( - "encoding/json" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/clientapi/auth/storage/devices" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/sync" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/gomatrixserverlib" - "github.com/matrix-org/util" - "net/http" -) - -// SendToDevice this is a function for calling process of send-to-device messages those bypassed DAG -func SendToDevice( - req *http.Request, - sender string, - syncDB *storage.SyncServerDatabase, - deviceDB *devices.Database, - eventType, txnID string, - notifier *sync.Notifier, -) util.JSONResponse { - ctx := req.Context() - stdRq := types.StdRequest{} - httputil.UnmarshalJSONRequest(req, &stdRq) - for uid, deviceMap := range stdRq.Sender { - - // federation consideration todo: - // if uid is remote domain a fed process should go - if false { - // federation process - return util.JSONResponse{} - } - - // uid is local domain - for device, cont := range deviceMap { - jsonBuffer, err := json.Marshal(cont) - if err != nil { - return util.JSONResponse{ - Code: http.StatusForbidden, - JSON: struct{}{}, - } - } - ev := types.StdHolder{ - Sender: sender, - Event: jsonBuffer, - EventTyp: eventType, - } - var pos int64 - - // wildcard all devices - if device == "*" { - var deviceCollection []authtypes.Device - var localpart string - localpart, _, _ = gomatrixserverlib.SplitID('@', uid) - deviceCollection, err = deviceDB.GetDevicesByLocalpart(ctx, localpart) - for _, val := range deviceCollection { - pos, err = syncDB.InsertStdMessage(ctx, ev, txnID, uid, val.ID) - notifier.OnNewEvent(nil, uid, types.StreamPosition(pos)) - } - if err != nil { - return util.JSONResponse{ - Code: http.StatusForbidden, - JSON: struct{}{}, - } - } - return util.JSONResponse{ - Code: http.StatusOK, - JSON: struct{}{}, - } - } - pos, err = syncDB.InsertStdMessage(ctx, ev, txnID, uid, device) - if err != nil { - return util.JSONResponse{ - Code: http.StatusForbidden, - JSON: struct{}{}, - } - } - notifier.OnNewEvent(nil, uid, types.StreamPosition(pos)) - } - } - - return util.JSONResponse{ - Code: http.StatusOK, - JSON: struct{}{}, - } -} diff --git a/syncapi/routing/routing.go b/syncapi/routing/routing.go index bf4508b81..0c7376da2 100644 --- a/syncapi/routing/routing.go +++ b/syncapi/routing/routing.go @@ -32,17 +32,13 @@ const pathPrefixR0 = "/_matrix/client/r0" const pathPrefixUnstable = "/_matrix/client/unstable" // Setup configures the given mux with sync-server listeners -<<<<<<< HEAD:syncapi/routing/routing.go // // Due to Setup being used to call many other functions, a gocyclo nolint is // applied: // nolint: gocyclo -func Setup(apiMux *mux.Router, srp *sync.RequestPool, syncDB *storage.SyncServerDatasource, deviceDB *devices.Database) { -======= -func Setup(apiMux *mux.Router, srp *sync.RequestPool, syncDB *storage.SyncServerDatabase, deviceDB *devices.Database, notifier *sync.Notifier, encryptDB *encryptoapi.Database) { ->>>>>>> 8b4b3c6fc46900e9bfe5e234eda309200662b34a:src/github.com/matrix-org/dendrite/syncapi/routing/routing.go +func Setup(apiMux *mux.Router, srp *sync.RequestPool, syncDB *storage.SyncServerDatasource, deviceDB *devices.Database, notifier *sync.Notifier, encryptDB *encryptoapi.Database) { r0mux := apiMux.PathPrefix(pathPrefixR0).Subrouter() - unstablemux := apiMux.PathPrefix(pathPrefixUnstable).Subrouter() + // unstablemux := apiMux.PathPrefix(pathPrefixUnstable).Subrouter() authData := auth.Data{ AccountDB: nil, @@ -79,12 +75,12 @@ func Setup(apiMux *mux.Router, srp *sync.RequestPool, syncDB *storage.SyncServer return OnIncomingStateTypeRequest(req, syncDB, vars["roomID"], vars["type"], vars["stateKey"]) })).Methods(http.MethodGet, http.MethodOptions) - unstablemux.Handle("/sendToDevice/{eventType}/{txnId}", - common.MakeAuthAPI("look up changes", authData, func(req *http.Request, device *authtypes.Device) util.JSONResponse { - vars := mux.Vars(req) - eventType := vars["eventType"] - txnID := vars["txnId"] - return SendToDevice(req, device.UserID, syncDB, deviceDB, eventType, txnID, notifier) - }), - ).Methods(http.MethodPut, http.MethodOptions) + // unstablemux.Handle("/sendToDevice/{eventType}/{txnId}", + // common.MakeAuthAPI("look up changes", authData, func(req *http.Request, device *authtypes.Device) util.JSONResponse { + // vars := mux.Vars(req) + // eventType := vars["eventType"] + // txnID := vars["txnId"] + // return SendToDevice(req, device.UserID, syncDB, deviceDB, eventType, txnID, notifier) + // }), + // ).Methods(http.MethodPut, http.MethodOptions) } diff --git a/syncapi/routing/std.go b/syncapi/routing/std.go new file mode 100644 index 000000000..3e78e6bad --- /dev/null +++ b/syncapi/routing/std.go @@ -0,0 +1,89 @@ +package routing + +// import ( +// "encoding/json" +// "github.com/matrix-org/dendrite/clientapi/auth/authtypes" +// "github.com/matrix-org/dendrite/clientapi/auth/storage/devices" +// "github.com/matrix-org/dendrite/clientapi/httputil" +// "github.com/matrix-org/dendrite/syncapi/storage" +// "github.com/matrix-org/dendrite/syncapi/sync" +// "github.com/matrix-org/dendrite/syncapi/types" +// "github.com/matrix-org/gomatrixserverlib" +// "github.com/matrix-org/util" +// "net/http" +// ) + +// // SendToDevice this is a function for calling process of send-to-device messages those bypassed DAG +// func SendToDevice( +// req *http.Request, +// sender string, +// syncDB *storage.SyncServerDatasource, +// deviceDB *devices.Database, +// eventType, txnID string, +// notifier *sync.Notifier, +// ) util.JSONResponse { +// ctx := req.Context() +// stdRq := types.StdRequest{} +// httputil.UnmarshalJSONRequest(req, &stdRq) +// for uid, deviceMap := range stdRq.Sender { + +// // federation consideration todo: +// // if uid is remote domain a fed process should go +// if false { +// // federation process +// return util.JSONResponse{} +// } + +// // uid is local domain +// for device, cont := range deviceMap { +// jsonBuffer, err := json.Marshal(cont) +// if err != nil { +// return util.JSONResponse{ +// Code: http.StatusForbidden, +// JSON: struct{}{}, +// } +// } +// ev := types.StdHolder{ +// Sender: sender, +// Event: jsonBuffer, +// EventTyp: eventType, +// } +// var pos int64 + +// // wildcard all devices +// if device == "*" { +// var deviceCollection []authtypes.Device +// var localpart string +// localpart, _, _ = gomatrixserverlib.SplitID('@', uid) +// deviceCollection, err = deviceDB.GetDevicesByLocalpart(ctx, localpart) +// for _, val := range deviceCollection { +// pos, err = syncDB.InsertStdMessage(ctx, ev, txnID, uid, val.ID) +// notifier.OnNewEvent(nil, uid, types.StreamPosition(pos)) +// } +// if err != nil { +// return util.JSONResponse{ +// Code: http.StatusForbidden, +// JSON: struct{}{}, +// } +// } +// return util.JSONResponse{ +// Code: http.StatusOK, +// JSON: struct{}{}, +// } +// } +// pos, err = syncDB.InsertStdMessage(ctx, ev, txnID, uid, device) +// if err != nil { +// return util.JSONResponse{ +// Code: http.StatusForbidden, +// JSON: struct{}{}, +// } +// } +// notifier.OnNewEvent(nil, uid, types.StreamPosition(pos)) +// } +// } + +// return util.JSONResponse{ +// Code: http.StatusOK, +// JSON: struct{}{}, +// } +// } diff --git a/src/github.com/matrix-org/dendrite/syncapi/storage/send_to_device_table.go b/syncapi/storage/send_to_device_table.go similarity index 100% rename from src/github.com/matrix-org/dendrite/syncapi/storage/send_to_device_table.go rename to syncapi/storage/send_to_device_table.go diff --git a/syncapi/storage/syncserver.go b/syncapi/storage/syncserver.go index 653b060c7..0f8fdf812 100644 --- a/syncapi/storage/syncserver.go +++ b/syncapi/storage/syncserver.go @@ -27,12 +27,8 @@ import ( "github.com/matrix-org/dendrite/clientapi/auth/authtypes" "github.com/matrix-org/dendrite/roomserver/api" -<<<<<<< HEAD:syncapi/storage/syncserver.go // Import the postgres database driver. _ "github.com/lib/pq" -======= - "encoding/json" ->>>>>>> 8b4b3c6fc46900e9bfe5e234eda309200662b34a:src/github.com/matrix-org/dendrite/syncapi/storage/syncserver.go "github.com/matrix-org/dendrite/common" "github.com/matrix-org/dendrite/syncapi/types" "github.com/matrix-org/dendrite/typingserver/cache" @@ -55,7 +51,7 @@ type streamEvent struct { transactionID *api.TransactionID } -// SyncServerDatabase represents a sync server datasource which manages +// SyncServerDatasource represents a sync server datasource which manages // both the database for PDUs and caches for EDUs. type SyncServerDatasource struct { db *sql.DB @@ -64,14 +60,11 @@ type SyncServerDatasource struct { events outputRoomEventsStatements roomstate currentRoomStateStatements invites inviteEventsStatements -<<<<<<< HEAD:syncapi/storage/syncserver.go typingCache *cache.TypingCache -======= stdMsg stdEventsStatements ->>>>>>> 8b4b3c6fc46900e9bfe5e234eda309200662b34a:src/github.com/matrix-org/dendrite/syncapi/storage/syncserver.go } -// NewSyncServerDatabase creates a new sync server database +// NewSyncServerDatasource creates a new sync server database func NewSyncServerDatasource(dbDataSourceName string) (*SyncServerDatasource, error) { var d SyncServerDatasource var err error @@ -93,13 +86,10 @@ func NewSyncServerDatasource(dbDataSourceName string) (*SyncServerDatasource, er if err := d.invites.prepare(d.db); err != nil { return nil, err } -<<<<<<< HEAD:syncapi/storage/syncserver.go d.typingCache = cache.NewTypingCache() -======= if err := d.stdMsg.prepare(d.db); err != nil { return nil, err } ->>>>>>> 8b4b3c6fc46900e9bfe5e234eda309200662b34a:src/github.com/matrix-org/dendrite/syncapi/storage/syncserver.go return &d, nil } @@ -235,22 +225,22 @@ func (d *SyncServerDatasource) syncPositionTx( if maxInviteID > maxEventID { maxEventID = maxInviteID } -<<<<<<< HEAD:syncapi/storage/syncserver.go + + // E2EE changes look + // maxStdID, err := d.stdMsg.selectMaxStdID(ctx, txn) + // if err != nil { + // return 0, err + // } + // if maxStdID > maxID { + // maxID = maxStdID + // } + // return types.StreamPosition(maxID), nil sp.PDUPosition = maxEventID sp.TypingPosition = d.typingCache.GetLatestSyncPosition() return -======= - maxStdID, err := d.stdMsg.selectMaxStdID(ctx, txn) - if err != nil { - return 0, err - } - if maxStdID > maxID { - maxID = maxStdID - } - return types.StreamPosition(maxID), nil ->>>>>>> 8b4b3c6fc46900e9bfe5e234eda309200662b34a:src/github.com/matrix-org/dendrite/syncapi/storage/syncserver.go + } // addPDUDeltaToResponse adds all PDU deltas to a sync response. @@ -977,7 +967,7 @@ del / maxID / select in range / insert */ // DelStdMessage delete message for a given maxID, those below would be deleted -func (d *SyncServerDatabase) DelStdMessage( +func (d *SyncServerDatasource) DelStdMessage( ctx context.Context, targetUID, targetDevice string, maxID int64, ) (err error) { err = common.WithTransaction(d.db, func(txn *sql.Tx) error { @@ -988,7 +978,7 @@ func (d *SyncServerDatabase) DelStdMessage( } // InsertStdMessage insert std message -func (d *SyncServerDatabase) InsertStdMessage( +func (d *SyncServerDatasource) InsertStdMessage( ctx context.Context, stdEvent types.StdHolder, transactionID, targetUID, targetDevice string, ) (pos int64, err error) { err = common.WithTransaction(d.db, func(txn *sql.Tx) error { @@ -1000,7 +990,7 @@ func (d *SyncServerDatabase) InsertStdMessage( } // SelectMaxStdID select maximum id in std stream -func (d *SyncServerDatabase) SelectMaxStdID( +func (d *SyncServerDatasource) SelectMaxStdID( ctx context.Context, ) (maxID int64, err error) { err = common.WithTransaction(d.db, func(txn *sql.Tx) error { @@ -1012,7 +1002,7 @@ func (d *SyncServerDatabase) SelectMaxStdID( } // SelectRangedStd select a range of std messages -func (d *SyncServerDatabase) SelectRangedStd( +func (d *SyncServerDatasource) SelectRangedStd( ctx context.Context, targetUserID, targetDeviceID string, endPos int64, @@ -1028,7 +1018,7 @@ func (d *SyncServerDatabase) SelectRangedStd( // StdEXT : send to device extension process func StdEXT( ctx context.Context, - syncDB *SyncServerDatabase, + syncDB *SyncServerDatasource, respIn types.Response, userID, deviceID string, since int64, diff --git a/src/github.com/matrix-org/dendrite/syncapi/sync/keyextension.go b/syncapi/sync/keyextension.go similarity index 100% rename from src/github.com/matrix-org/dendrite/syncapi/sync/keyextension.go rename to syncapi/sync/keyextension.go diff --git a/syncapi/sync/requestpool.go b/syncapi/sync/requestpool.go index b00db4e63..0a82565ff 100644 --- a/syncapi/sync/requestpool.go +++ b/syncapi/sync/requestpool.go @@ -45,13 +45,8 @@ func NewRequestPool(db *storage.SyncServerDatasource, n *Notifier, adb *accounts // OnIncomingSyncRequest is called when a client makes a /sync request. This function MUST be // called in a dedicated goroutine for this request. This function will block the goroutine // until a response is ready, or it times out. -<<<<<<< HEAD:syncapi/sync/requestpool.go -func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request, device *authtypes.Device) util.JSONResponse { - var syncData *types.Response - -======= func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request, device *authtypes.Device, encryptDB *encryptoapi.Database) util.JSONResponse { ->>>>>>> 8b4b3c6fc46900e9bfe5e234eda309200662b34a:src/github.com/matrix-org/dendrite/syncapi/sync/requestpool.go + var syncData *types.Response // Extract values from request logger := util.GetLogger(req.Context()) userID := device.UserID @@ -120,16 +115,14 @@ func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request, device *authtype // of calculating the sync only to get timed out before we // can respond -<<<<<<< HEAD:syncapi/sync/requestpool.go - syncData, err = rp.currentSyncForUser(*syncReq, currPos) -======= + // syncData, err = rp.currentSyncForUser(*syncReq, currPos) syncData, err := rp.currentSyncForUser(*syncReq, currPos) // std extension consideration - syncData = storage.StdEXT(syncReq.ctx, rp.db, *syncData, syncReq.device.UserID, syncReq.device.ID, int64(currPos)) + // Have to check which "position" must be used here + // syncData = storage.StdEXT(syncReq.ctx, rp.db, *syncData, syncReq.device.UserID, syncReq.device.ID, int64(currPos)) syncData = KeyCountEXT(syncReq.ctx, encryptDB, *syncData, syncReq.device.UserID, syncReq.device.ID) ->>>>>>> 8b4b3c6fc46900e9bfe5e234eda309200662b34a:src/github.com/matrix-org/dendrite/syncapi/sync/requestpool.go if err != nil { return httputil.LogThenError(req, err) } diff --git a/syncapi/syncapi.go b/syncapi/syncapi.go index bee198862..68fd15c49 100644 --- a/syncapi/syncapi.go +++ b/syncapi/syncapi.go @@ -72,7 +72,6 @@ func SetupSyncAPIComponent( logrus.WithError(err).Panicf("failed to start client data consumer") } -<<<<<<< HEAD:syncapi/syncapi.go typingConsumer := consumers.NewOutputTypingEventConsumer( base.Cfg, base.KafkaConsumer, notifier, syncDB, ) @@ -80,8 +79,6 @@ func SetupSyncAPIComponent( logrus.WithError(err).Panicf("failed to start typing server consumer") } - routing.Setup(base.APIMux, requestPool, syncDB, deviceDB) -======= + // routing.Setup(base.APIMux, requestPool, syncDB, deviceDB) routing.Setup(base.APIMux, requestPool, syncDB, deviceDB, notifier, encryptDB) ->>>>>>> 8b4b3c6fc46900e9bfe5e234eda309200662b34a:src/github.com/matrix-org/dendrite/syncapi/syncapi.go }