aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-07-25 17:30:07 +0100
committerGitHub <noreply@github.com>2022-07-25 17:30:07 +0100
commit962b76da445e8af408d7473abfa0cb9d00423264 (patch)
tree2d7139afc142619766e1327281c8ce1741a3b613 /clientapi/routing
parent497ab4e1b7cb4225f57b87932a3dccfbbec74463 (diff)
Make the User API responsible for sending account data output events (#2592)
* Make the User API responsible for sending account data output events * Clean up producer * Review comments
Diffstat (limited to 'clientapi/routing')
-rw-r--r--clientapi/routing/account_data.go18
-rw-r--r--clientapi/routing/room_tagging.go11
2 files changed, 0 insertions, 29 deletions
diff --git a/clientapi/routing/account_data.go b/clientapi/routing/account_data.go
index a5a3014a..0d3a4949 100644
--- a/clientapi/routing/account_data.go
+++ b/clientapi/routing/account_data.go
@@ -25,7 +25,6 @@ import (
"github.com/matrix-org/dendrite/clientapi/producers"
"github.com/matrix-org/dendrite/internal/eventutil"
roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
- "github.com/matrix-org/dendrite/syncapi/types"
"github.com/matrix-org/dendrite/userapi/api"
"github.com/matrix-org/util"
@@ -127,18 +126,6 @@ func SaveAccountData(
return util.ErrorResponse(err)
}
- var ignoredUsers *types.IgnoredUsers
- if dataType == "m.ignored_user_list" {
- ignoredUsers = &types.IgnoredUsers{}
- _ = json.Unmarshal(body, ignoredUsers)
- }
-
- // TODO: user API should do this since it's account data
- if err := syncProducer.SendData(userID, roomID, dataType, nil, ignoredUsers); err != nil {
- util.GetLogger(req.Context()).WithError(err).Error("syncProducer.SendData failed")
- return jsonerror.InternalServerError()
- }
-
return util.JSONResponse{
Code: http.StatusOK,
JSON: struct{}{},
@@ -191,11 +178,6 @@ func SaveReadMarker(
return util.ErrorResponse(err)
}
- if err := syncProducer.SendData(device.UserID, roomID, "m.fully_read", &r, nil); err != nil {
- util.GetLogger(req.Context()).WithError(err).Error("syncProducer.SendData failed")
- return jsonerror.InternalServerError()
- }
-
// Handle the read receipt that may be included in the read marker
if r.Read != "" {
return SetReceipt(req, syncProducer, device, roomID, "m.read", r.Read)
diff --git a/clientapi/routing/room_tagging.go b/clientapi/routing/room_tagging.go
index 03928956..92b9e665 100644
--- a/clientapi/routing/room_tagging.go
+++ b/clientapi/routing/room_tagging.go
@@ -18,8 +18,6 @@ import (
"encoding/json"
"net/http"
- "github.com/sirupsen/logrus"
-
"github.com/matrix-org/dendrite/clientapi/httputil"
"github.com/matrix-org/dendrite/clientapi/jsonerror"
"github.com/matrix-org/dendrite/clientapi/producers"
@@ -98,10 +96,6 @@ func PutTag(
return jsonerror.InternalServerError()
}
- if err = syncProducer.SendData(userID, roomID, "m.tag", nil, nil); err != nil {
- logrus.WithError(err).Error("Failed to send m.tag account data update to syncapi")
- }
-
return util.JSONResponse{
Code: http.StatusOK,
JSON: struct{}{},
@@ -150,11 +144,6 @@ func DeleteTag(
return jsonerror.InternalServerError()
}
- // TODO: user API should do this since it's account data
- if err := syncProducer.SendData(userID, roomID, "m.tag", nil, nil); err != nil {
- logrus.WithError(err).Error("Failed to send m.tag account data update to syncapi")
- }
-
return util.JSONResponse{
Code: http.StatusOK,
JSON: struct{}{},