mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 05:12:26 +03:00
Make clientapi:sendevents idempotent (#444)
* Add transactions.Cache to clientapi setup * Add idempotency to clientapi/SendEvent
This commit is contained in:
parent
8861437c26
commit
29532e7bc3
5 changed files with 35 additions and 7 deletions
|
@ -18,6 +18,7 @@ import (
|
|||
"github.com/matrix-org/dendrite/clientapi"
|
||||
"github.com/matrix-org/dendrite/common/basecomponent"
|
||||
"github.com/matrix-org/dendrite/common/keydb"
|
||||
"github.com/matrix-org/dendrite/common/transactions"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -33,10 +34,11 @@ func main() {
|
|||
keyRing := keydb.CreateKeyRing(federation.Client, keyDB)
|
||||
|
||||
alias, input, query := base.CreateHTTPRoomserverAPIs()
|
||||
cache := transactions.New()
|
||||
|
||||
clientapi.SetupClientAPIComponent(
|
||||
base, deviceDB, accountDB, federation, &keyRing,
|
||||
alias, input, query,
|
||||
alias, input, query, cache,
|
||||
)
|
||||
|
||||
base.SetupAndServeHTTP(string(base.Cfg.Listen.ClientAPI))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue