diff options
author | Kegsay <kegan@matrix.org> | 2020-06-10 12:17:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-10 12:17:54 +0100 |
commit | b7187a9a354530c1846c2a97be701ea484f91c2c (patch) | |
tree | 6d14903a444fa8bca964247dbe85ae8d9709d4c8 /clientapi/routing/sendtyping.go | |
parent | d9d6f4568ce891ae0ae9d2a3449974d3777bd21d (diff) |
Remove clientapi producers which aren't actually producers (#1111)
* Remove clientapi producers which aren't actually producers
They are actually just convenience wrappers around the internal APIs
for roomserver/eduserver. Move their logic to their respective `api`
packages and call them directly.
* Remove TODO
* unbreak ygg
Diffstat (limited to 'clientapi/routing/sendtyping.go')
-rw-r--r-- | clientapi/routing/sendtyping.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clientapi/routing/sendtyping.go b/clientapi/routing/sendtyping.go index ffaa0e66..2eae1658 100644 --- a/clientapi/routing/sendtyping.go +++ b/clientapi/routing/sendtyping.go @@ -20,8 +20,8 @@ import ( "github.com/matrix-org/dendrite/clientapi/auth/storage/accounts" "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/clientapi/producers" "github.com/matrix-org/dendrite/clientapi/userutil" + "github.com/matrix-org/dendrite/eduserver/api" "github.com/matrix-org/util" ) @@ -35,7 +35,7 @@ type typingContentJSON struct { func SendTyping( req *http.Request, device *authtypes.Device, roomID string, userID string, accountDB accounts.Database, - eduProducer *producers.EDUServerProducer, + eduAPI api.EDUServerInputAPI, ) util.JSONResponse { if device.UserID != userID { return util.JSONResponse{ @@ -69,8 +69,8 @@ func SendTyping( return *resErr } - if err = eduProducer.SendTyping( - req.Context(), userID, roomID, r.Typing, r.Timeout, + if err = api.SendTyping( + req.Context(), eduAPI, userID, roomID, r.Typing, r.Timeout, ); err != nil { util.GetLogger(req.Context()).WithError(err).Error("eduProducer.Send failed") return jsonerror.InternalServerError() |