Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream release v0.9.0 #18

Merged
merged 63 commits into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
660f783
Correctly redact events over federation (#2526)
S7evinK Jun 9, 2022
e2a6477
Add new next steps page to the documentation
neilalexander Jun 10, 2022
16ed163
Highlighting in docs
neilalexander Jun 10, 2022
1030072
Rename the page to "Optimise your installation"
neilalexander Jun 10, 2022
89d2ada
Attempt to raise the file descriptor limit at startup (#2527)
neilalexander Jun 10, 2022
0a7f7dc
Add `--difference` to `resolve-state` tool
neilalexander Jun 13, 2022
e1136f4
Make the linter happy again
S7evinK Jun 13, 2022
c500958
generic CaddyFile in front of Dendrite (monolith) (#2531)
ealib Jun 13, 2022
4c2a10f
Handle state before, send history visibility in output (#2532)
neilalexander Jun 13, 2022
1b90cc9
Fix rare panic when returning user devices over federation (#2534)
S7evinK Jun 15, 2022
7120eb6
Add `InputDeviceListUpdate` to the keyserver, remove old input API (#…
neilalexander Jun 15, 2022
920a208
Fix nats.go commit (#2540)
flacks Jun 27, 2022
2086992
Don't return `end` if there are not more messages (#2542)
S7evinK Jun 29, 2022
2dea466
Return an error if trying to invite a malformed user ID (#2543)
neilalexander Jun 29, 2022
519bc11
Add `evacuateUser` endpoint, use it when deactivating accounts (#2545)
neilalexander Jun 29, 2022
561c159
Silence presence logs (#2547)
S7evinK Jun 30, 2022
54bed4c
Blacklist `Guest users can join guest_access rooms` test until it can…
neilalexander Jul 1, 2022
086f182
Disable WebAssembly builds for now
neilalexander Jul 1, 2022
89cd0e8
Try to fix backfilling (#2548)
S7evinK Jul 1, 2022
b50a24c
Roomserver producers package (#2546)
neilalexander Jul 1, 2022
b5c55fa
Version 0.8.9 (#2549)
neilalexander Jul 1, 2022
43147bd
feat+fix: Ignore unknown keys and verify required fields are present …
Kab1r Jul 5, 2022
f29cdb2
Use new testrig for key changes tests (#2552)
S7evinK Jul 5, 2022
5087b36
Fix QuerySharedUsers for the SyncAPI keychange consumer (#2554)
S7evinK Jul 5, 2022
d4341a2
Return clearer error when no state NID exists for an event (#2555)
neilalexander Jul 5, 2022
c0f824d
Wrap error from `SnapshotNIDFromEventID`
neilalexander Jul 5, 2022
460dccf
Hopefully fix read receipts timestamps (#2557)
neilalexander Jul 5, 2022
f3e8a9a
Fix nil pointer access when redacting events (#2560)
S7evinK Jul 7, 2022
f76f28e
Fix issue `uint64 values with high bit are not supported` in presence…
S7evinK Jul 7, 2022
eb8dc50
Update Pinecone to matrix-org/pinecone@1ce778f
neilalexander Jul 8, 2022
3ea2127
Ristretto cache (#2563)
neilalexander Jul 11, 2022
09f0ff1
Minor SendToDevice fix (#2565)
S7evinK Jul 12, 2022
9cd8e9d
Use `/v3` to request media from remote servers (update to matrix-org/…
neilalexander Jul 13, 2022
a1f9b02
Pointerise `types.RoomInfo` in the cache so we can update it in-place…
neilalexander Jul 13, 2022
9506593
Add a Troubleshooting page
neilalexander Jul 14, 2022
69c8629
Update `sytest-whitelist`
neilalexander Jul 14, 2022
90bf01d
Use sync API database in `filterSharedUsers` (#2572)
neilalexander Jul 15, 2022
4ff5799
Update 1_createusers.md (#2571)
andreever Jul 15, 2022
c0c909d
Fix connection_string format in dendrite-sample.polylith.yaml (#2574)
MaximilianGaedig Jul 17, 2022
a7e92f8
History visibility database changes (#2533)
S7evinK Jul 18, 2022
99b696e
Tweak cache counters (#2575)
neilalexander Jul 18, 2022
bcff14a
Set historyVisibility in rowsToStreamEvents
S7evinK Jul 18, 2022
583b8ea
Update FAQ
neilalexander Jul 19, 2022
5c01306
Add event state key cache (#2576)
neilalexander Jul 19, 2022
84a7797
Explain how SRV works in Matrix and discourage using it (#2577)
tulir Jul 19, 2022
9507966
Fix issue with membership event_nid being 0 (#2580)
S7evinK Jul 20, 2022
35ce551
docs: Add build page; correct proxy info; fix Caddy example (#2579)
mholt Jul 21, 2022
a201b44
Bump tzinfo from 1.2.9 to 1.2.10 in /docs (#2584)
dependabot[bot] Jul 22, 2022
f0c8a03
Membership updater refactoring (#2541)
neilalexander Jul 22, 2022
c7d9782
Try to fix HTTP 500s on `/members` (#2581)
neilalexander Jul 22, 2022
081f5e7
Update database migrations, remove goose (#2264)
S7evinK Jul 25, 2022
b836243
Add .well-known/matrix/client to clientapi (#2551)
Jonnobrow Jul 25, 2022
ccea23c
Remove `room_id` field from MSC2946 stripped events (closes #2588)
neilalexander Jul 25, 2022
497ab4e
Remove `goose` from Dockerfiles
neilalexander Jul 25, 2022
962b76d
Make the User API responsible for sending account data output events …
neilalexander Jul 25, 2022
645f31a
Update NATS Server and nats.go to use upstream
neilalexander Aug 1, 2022
c7f7aec
Set CORS headers for HTTP 404 and 405 errors (#2599)
neilalexander Aug 1, 2022
05c8392
Optimise checking other servers allowed to see events (#2596)
neilalexander Aug 1, 2022
119cde3
De-race `types.RoomInfo` (#2600)
neilalexander Aug 1, 2022
e94ef84
De-race `CompleteSync` (#2601)
neilalexander Aug 1, 2022
3d51624
Version 0.9.0 (#2602)
neilalexander Aug 1, 2022
2d45cd7
Merge tag 'v0.9.0' into release/upstream
PiotrKozimor Aug 2, 2022
b95b33d
Merge remote-tracking branch 'origin/main' into release/upstream
PiotrKozimor Aug 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions .github/workflows/dendrite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: "1.16"
go-version: "1.18"
- uses: actions/cache@v3
with:
path: |
Expand All @@ -145,6 +145,31 @@ jobs:
- name: Test upgrade
run: ./dendrite-upgrade-tests --head .

# run database upgrade tests, skipping over one version
upgrade_test_direct:
name: Upgrade tests from HEAD-2
timeout-minutes: 20
needs: initial-tests-done
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: "1.18"
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-upgrade-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-upgrade
- name: Build upgrade-tests
run: go build ./cmd/dendrite-upgrade-tests
- name: Test upgrade
run: ./dendrite-upgrade-tests -direct -from HEAD-2 --head .

# run Sytest in different variations
sytest:
timeout-minutes: 20
Expand Down Expand Up @@ -280,7 +305,7 @@ jobs:

integration-tests-done:
name: Integration tests passed
needs: [initial-tests-done, upgrade_test, sytest, complement]
needs: [initial-tests-done, upgrade_test, upgrade_test_direct, sytest, complement]
runs-on: ubuntu-latest
if: ${{ !cancelled() }} # Run this even if prior jobs were skipped
steps:
Expand Down
30 changes: 30 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Changelog

## Dendrite 0.9.0 (2022-08-01)

### Features

* Dendrite now uses Ristretto for managing in-memory caches
* Should improve cache utilisation considerably over time by more intelligently selecting and managing cache entries compared to the previous LRU-based cache
* Defaults to a 1GB cache size if not configured otherwise
* The estimated cache size in memory and maximum age can now be configured with new [configuration options](https://github.com/matrix-org/dendrite/blob/e94ef84aaba30e12baf7f524c4e7a36d2fdeb189/dendrite-sample.monolith.yaml#L44-L61) to prevent unbounded cache growth
* Added support for serving the `/.well-known/matrix/client` hint directly from Dendrite
* Configurable with the new [configuration option](https://github.com/matrix-org/dendrite/blob/e94ef84aaba30e12baf7f524c4e7a36d2fdeb189/dendrite-sample.monolith.yaml#L67-L69)
* Refactored membership updater, which should eliminate some bugs caused by the membership table getting out of sync with the room state
* The User API is now responsible for sending account data updates to other components, which may fix some races and duplicate account data events
* Optimised database query for checking whether a remote server is allowed to request an event over federation without using anywhere near as much CPU time (PostgreSQL only)
* Database migrations have been refactored to eliminate some problems that were present with `goose` and upgrading from older Dendrite versions
* Media fetching will now use the `/v3` endpoints for downloading media from remote homeservers
* HTTP 404 and HTTP 405 errors from the client-facing APIs should now be returned with CORS headers so that web-based clients do not produce incorrect access control warnings for unknown endpoints
* Some preparation work for full history visibility support

### Fixes

* Fixes a crash that could occur during event redaction
* The `/members` endpoint will no longer incorrectly return HTTP 500 as a result of some invite events
* Send-to-device messages should now be ordered more reliably and the last position in the stream updated correctly
* Parsing of appservice configuration files is now less strict (contributed by [Kab1r](https://github.com/Kab1r))
* The sync API should now identify shared users correctly when waking up for E2EE key changes
* The federation `/state` endpoint will now return a HTTP 403 when the state before an event isn't known instead of a HTTP 500
* Presence timestamps should now be calculated with the correct precision
* A race condition in the roomserver's room info has been fixed
* A race condition in the sync API has been fixed

## Dendrite 0.8.9 (2022-07-01)

### Features
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ If you have further questions, please take a look at [our FAQ](docs/FAQ.md) or j

## Requirements

To build Dendrite, you will need Go 1.16 or later.
To build Dendrite, you will need Go 1.18 or later.

For a usable federating Dendrite deployment, you will also need:

Expand Down
1 change: 0 additions & 1 deletion build/docker/Dockerfile.monolith
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ COPY . /build

RUN mkdir -p bin
RUN go build -trimpath -o bin/ ./cmd/dendrite-monolith-server
RUN go build -trimpath -o bin/ ./cmd/goose
RUN go build -trimpath -o bin/ ./cmd/create-account
RUN go build -trimpath -o bin/ ./cmd/generate-keys

Expand Down
1 change: 0 additions & 1 deletion build/docker/Dockerfile.polylith
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ COPY . /build

RUN mkdir -p bin
RUN go build -trimpath -o bin/ ./cmd/dendrite-polylith-multi
RUN go build -trimpath -o bin/ ./cmd/goose
RUN go build -trimpath -o bin/ ./cmd/create-account
RUN go build -trimpath -o bin/ ./cmd/generate-keys

Expand Down
2 changes: 1 addition & 1 deletion build/gobind-pinecone/monolith.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (m *DendriteMonolith) Start() {
m.PineconeRouter = pineconeRouter.NewRouter(logrus.WithField("pinecone", "router"), sk, false)
m.PineconeQUIC = pineconeSessions.NewSessions(logrus.WithField("pinecone", "sessions"), m.PineconeRouter, []string{"matrix"})
m.PineconeMulticast = pineconeMulticast.NewMulticast(logrus.WithField("pinecone", "multicast"), m.PineconeRouter)
m.PineconeManager = pineconeConnections.NewConnectionManager(m.PineconeRouter)
m.PineconeManager = pineconeConnections.NewConnectionManager(m.PineconeRouter, nil)

prefix := hex.EncodeToString(pk)
cfg := &config.Dendrite{}
Expand Down
8 changes: 4 additions & 4 deletions build/scripts/Complement.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16-stretch as build
FROM golang:1.18-stretch as build
RUN apt-get update && apt-get install -y sqlite3
WORKDIR /build

Expand Down Expand Up @@ -27,6 +27,6 @@ EXPOSE 8008 8448
# At runtime, generate TLS cert based on the CA now mounted at /ca
# At runtime, replace the SERVER_NAME with what we are told
CMD ./generate-keys --server $SERVER_NAME --tls-cert server.crt --tls-key server.key --tls-authority-cert /complement/ca/ca.crt --tls-authority-key /complement/ca/ca.key && \
./generate-config -server $SERVER_NAME --ci > dendrite.yaml && \
cp /complement/ca/ca.crt /usr/local/share/ca-certificates/ && update-ca-certificates && \
./dendrite-monolith-server --really-enable-open-registration --tls-cert server.crt --tls-key server.key --config dendrite.yaml -api=${API:-0}
./generate-config -server $SERVER_NAME --ci > dendrite.yaml && \
cp /complement/ca/ca.crt /usr/local/share/ca-certificates/ && update-ca-certificates && \
./dendrite-monolith-server --really-enable-open-registration --tls-cert server.crt --tls-key server.key --config dendrite.yaml -api=${API:-0}
28 changes: 14 additions & 14 deletions build/scripts/ComplementLocal.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# Use these mounts to make use of this dockerfile:
# COMPLEMENT_HOST_MOUNTS='/your/local/dendrite:/dendrite:ro;/your/go/path:/go:ro'
FROM golang:1.16-stretch
FROM golang:1.18-stretch
RUN apt-get update && apt-get install -y sqlite3

WORKDIR /runtime
Expand All @@ -16,24 +16,24 @@ EXPOSE 8008 8448

# This script compiles Dendrite for us.
RUN echo '\
#!/bin/bash -eux \n\
if test -f "/runtime/dendrite-monolith-server"; then \n\
#!/bin/bash -eux \n\
if test -f "/runtime/dendrite-monolith-server"; then \n\
echo "Skipping compilation; binaries exist" \n\
exit 0 \n\
fi \n\
cd /dendrite \n\
go build -v -o /runtime /dendrite/cmd/dendrite-monolith-server \n\
' > compile.sh && chmod +x compile.sh
fi \n\
cd /dendrite \n\
go build -v -o /runtime /dendrite/cmd/dendrite-monolith-server \n\
' > compile.sh && chmod +x compile.sh

# This script runs Dendrite for us. Must be run in the /runtime directory.
RUN echo '\
#!/bin/bash -eu \n\
./generate-keys --private-key matrix_key.pem \n\
./generate-keys --server $SERVER_NAME --tls-cert server.crt --tls-key server.key --tls-authority-cert /complement/ca/ca.crt --tls-authority-key /complement/ca/ca.key \n\
./generate-config -server $SERVER_NAME --ci > dendrite.yaml \n\
cp /complement/ca/ca.crt /usr/local/share/ca-certificates/ && update-ca-certificates \n\
./dendrite-monolith-server --really-enable-open-registration --tls-cert server.crt --tls-key server.key --config dendrite.yaml \n\
' > run.sh && chmod +x run.sh
#!/bin/bash -eu \n\
./generate-keys --private-key matrix_key.pem \n\
./generate-keys --server $SERVER_NAME --tls-cert server.crt --tls-key server.key --tls-authority-cert /complement/ca/ca.crt --tls-authority-key /complement/ca/ca.key \n\
./generate-config -server $SERVER_NAME --ci > dendrite.yaml \n\
cp /complement/ca/ca.crt /usr/local/share/ca-certificates/ && update-ca-certificates \n\
./dendrite-monolith-server --really-enable-open-registration --tls-cert server.crt --tls-key server.key --config dendrite.yaml \n\
' > run.sh && chmod +x run.sh


WORKDIR /cache
Expand Down
34 changes: 17 additions & 17 deletions build/scripts/ComplementPostgres.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16-stretch as build
FROM golang:1.18-stretch as build
RUN apt-get update && apt-get install -y postgresql
WORKDIR /build

Expand All @@ -9,16 +9,16 @@ RUN sed -i "s%127.0.0.1/32 md5%127.0.0.1/32 trust%g" /etc/

# This entry script starts postgres, waits for it to be up then starts dendrite
RUN echo '\
#!/bin/bash -eu \n\
pg_lsclusters \n\
pg_ctlcluster 9.6 main start \n\
\n\
until pg_isready \n\
do \n\
echo "Waiting for postgres"; \n\
sleep 1; \n\
done \n\
' > run_postgres.sh && chmod +x run_postgres.sh
#!/bin/bash -eu \n\
pg_lsclusters \n\
pg_ctlcluster 9.6 main start \n\
\n\
until pg_isready \n\
do \n\
echo "Waiting for postgres"; \n\
sleep 1; \n\
done \n\
' > run_postgres.sh && chmod +x run_postgres.sh

# we will dump the binaries and config file to this location to ensure any local untracked files
# that come from the COPY . . file don't contaminate the build
Expand Down Expand Up @@ -46,9 +46,9 @@ EXPOSE 8008 8448
# At runtime, generate TLS cert based on the CA now mounted at /ca
# At runtime, replace the SERVER_NAME with what we are told
CMD /build/run_postgres.sh && ./generate-keys --server $SERVER_NAME --tls-cert server.crt --tls-key server.key --tls-authority-cert /complement/ca/ca.crt --tls-authority-key /complement/ca/ca.key && \
./generate-config -server $SERVER_NAME --ci > dendrite.yaml && \
# Replace the connection string with a single postgres DB, using user/db = 'postgres' and no password, bump max_conns
sed -i "s%connection_string:.*$%connection_string: postgresql://postgres@localhost/postgres?sslmode=disable%g" dendrite.yaml && \
sed -i 's/max_open_conns:.*$/max_open_conns: 100/g' dendrite.yaml && \
cp /complement/ca/ca.crt /usr/local/share/ca-certificates/ && update-ca-certificates && \
./dendrite-monolith-server --really-enable-open-registration --tls-cert server.crt --tls-key server.key --config dendrite.yaml -api=${API:-0}
./generate-config -server $SERVER_NAME --ci > dendrite.yaml && \
# Replace the connection string with a single postgres DB, using user/db = 'postgres' and no password, bump max_conns
sed -i "s%connection_string:.*$%connection_string: postgresql://postgres@localhost/postgres?sslmode=disable%g" dendrite.yaml && \
sed -i 's/max_open_conns:.*$/max_open_conns: 100/g' dendrite.yaml && \
cp /complement/ca/ca.crt /usr/local/share/ca-certificates/ && update-ca-certificates && \
./dendrite-monolith-server --really-enable-open-registration --tls-cert server.crt --tls-key server.key --config dendrite.yaml -api=${API:-0}
2 changes: 1 addition & 1 deletion clientapi/clientapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ func AddPublicRoutes(

syncProducer := &producers.SyncAPIProducer{
JetStream: js,
TopicClientData: cfg.Matrix.JetStream.Prefixed(jetstream.OutputClientData),
TopicReceiptEvent: cfg.Matrix.JetStream.Prefixed(jetstream.OutputReceiptEvent),
TopicSendToDeviceEvent: cfg.Matrix.JetStream.Prefixed(jetstream.OutputSendToDeviceEvent),
TopicTypingEvent: cfg.Matrix.JetStream.Prefixed(jetstream.OutputTypingEvent),
Expand All @@ -59,6 +58,7 @@ func AddPublicRoutes(

routing.Setup(
base.PublicClientAPIMux,
base.PublicWellKnownAPIMux,
base.SynapseAdminMux,
base.DendriteAdminMux,
cfg, rsAPI, asAPI,
Expand Down
35 changes: 2 additions & 33 deletions clientapi/producers/syncapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ package producers
import (
"context"
"encoding/json"
"fmt"
"strconv"
"time"

"github.com/matrix-org/dendrite/internal/eventutil"
"github.com/matrix-org/dendrite/setup/jetstream"
"github.com/matrix-org/dendrite/syncapi/types"
userapi "github.com/matrix-org/dendrite/userapi/api"
Expand All @@ -31,7 +31,6 @@ import (

// SyncAPIProducer produces events for the sync API server to consume
type SyncAPIProducer struct {
TopicClientData string
TopicReceiptEvent string
TopicSendToDeviceEvent string
TopicTypingEvent string
Expand All @@ -41,36 +40,6 @@ type SyncAPIProducer struct {
UserAPI userapi.ClientUserAPI
}

// SendData sends account data to the sync API server
func (p *SyncAPIProducer) SendData(userID string, roomID string, dataType string, readMarker *eventutil.ReadMarkerJSON, ignoredUsers *types.IgnoredUsers) error {
m := &nats.Msg{
Subject: p.TopicClientData,
Header: nats.Header{},
}
m.Header.Set(jetstream.UserID, userID)

data := eventutil.AccountData{
RoomID: roomID,
Type: dataType,
ReadMarker: readMarker,
IgnoredUsers: ignoredUsers,
}
var err error
m.Data, err = json.Marshal(data)
if err != nil {
return err
}

log.WithFields(log.Fields{
"user_id": userID,
"room_id": roomID,
"data_type": dataType,
}).Tracef("Producing to topic '%s'", p.TopicClientData)

_, err = p.JetStream.PublishMsg(m)
return err
}

func (p *SyncAPIProducer) SendReceipt(
ctx context.Context,
userID, roomID, eventID, receiptType string, timestamp gomatrixserverlib.Timestamp,
Expand All @@ -83,7 +52,7 @@ func (p *SyncAPIProducer) SendReceipt(
m.Header.Set(jetstream.RoomID, roomID)
m.Header.Set(jetstream.EventID, eventID)
m.Header.Set("type", receiptType)
m.Header.Set("timestamp", strconv.Itoa(int(timestamp)))
m.Header.Set("timestamp", fmt.Sprintf("%d", timestamp))

log.WithFields(log.Fields{}).Tracef("Producing to topic '%s'", p.TopicReceiptEvent)
_, err := p.JetStream.PublishMsg(m, nats.Context(ctx))
Expand Down
18 changes: 0 additions & 18 deletions clientapi/routing/account_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{}{},
Expand Down Expand Up @@ -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)
Expand Down
11 changes: 0 additions & 11 deletions clientapi/routing/room_tagging.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{}{},
Expand Down Expand Up @@ -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{}{},
Expand Down
Loading