Merge branch 'main' into neilalexander/rsproducer

This commit is contained in:
Neil Alexander 2022-07-01 09:52:15 +01:00 committed by GitHub
commit bc76959661
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 7 additions and 6 deletions

View file

@ -17,6 +17,7 @@ jobs:
name: WASM build test name: WASM build test
timeout-minutes: 5 timeout-minutes: 5
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ false }} # disable for now
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View file

@ -21,4 +21,4 @@ mkdir -p bin
CGO_ENABLED=1 go build -trimpath -ldflags "$FLAGS" -v -o "bin/" ./cmd/... CGO_ENABLED=1 go build -trimpath -ldflags "$FLAGS" -v -o "bin/" ./cmd/...
CGO_ENABLED=0 GOOS=js GOARCH=wasm go build -trimpath -ldflags "$FLAGS" -o bin/main.wasm ./cmd/dendritejs-pinecone # CGO_ENABLED=0 GOOS=js GOARCH=wasm go build -trimpath -ldflags "$FLAGS" -o bin/main.wasm ./cmd/dendritejs-pinecone

View file

@ -133,7 +133,7 @@ func (t *OutputPresenceConsumer) onMessage(ctx context.Context, msg *nats.Msg) b
return true return true
} }
log.Debugf("sending presence EDU to %d servers", len(joined)) log.Tracef("sending presence EDU to %d servers", len(joined))
if err = t.queues.SendEDU(edu, t.ServerName, joined); err != nil { if err = t.queues.SendEDU(edu, t.ServerName, joined); err != nil {
log.WithError(err).Error("failed to send EDU") log.WithError(err).Error("failed to send EDU")
return false return false

View file

@ -159,7 +159,7 @@ func (p *SyncAPIProducer) SendPresence(
lastActiveTS := gomatrixserverlib.AsTimestamp(time.Now().Add(-(time.Duration(lastActiveAgo) * time.Millisecond))) lastActiveTS := gomatrixserverlib.AsTimestamp(time.Now().Add(-(time.Duration(lastActiveAgo) * time.Millisecond)))
m.Header.Set("last_active_ts", strconv.Itoa(int(lastActiveTS))) m.Header.Set("last_active_ts", strconv.Itoa(int(lastActiveTS)))
log.Debugf("Sending presence to syncAPI: %+v", m.Header) log.Tracef("Sending presence to syncAPI: %+v", m.Header)
_, err := p.JetStream.PublishMsg(m, nats.Context(ctx)) _, err := p.JetStream.PublishMsg(m, nats.Context(ctx))
return err return err
} }

View file

@ -138,7 +138,7 @@ func (s *PresenceConsumer) onMessage(ctx context.Context, msg *nats.Msg) bool {
presence := msg.Header.Get("presence") presence := msg.Header.Get("presence")
timestamp := msg.Header.Get("last_active_ts") timestamp := msg.Header.Get("last_active_ts")
fromSync, _ := strconv.ParseBool(msg.Header.Get("from_sync")) fromSync, _ := strconv.ParseBool(msg.Header.Get("from_sync"))
logrus.Debugf("syncAPI received presence event: %+v", msg.Header) logrus.Tracef("syncAPI received presence event: %+v", msg.Header)
if fromSync { // do not process local presence changes; we already did this synchronously. if fromSync { // do not process local presence changes; we already did this synchronously.
return true return true

View file

@ -111,7 +111,7 @@ func (p *PresenceStreamProvider) IncrementalSync(
currentlyActive := prevPresence.CurrentlyActive() currentlyActive := prevPresence.CurrentlyActive()
skip := prevPresence.Equals(presence) && currentlyActive && req.Device.UserID != presence.UserID skip := prevPresence.Equals(presence) && currentlyActive && req.Device.UserID != presence.UserID
if skip { if skip {
req.Log.Debugf("Skipping presence, no change (%s)", presence.UserID) req.Log.Tracef("Skipping presence, no change (%s)", presence.UserID)
continue continue
} }
} }

View file

@ -48,3 +48,4 @@ Notifications can be viewed with GET /notifications
# More flakey # More flakey
If remote user leaves room we no longer receive device updates If remote user leaves room we no longer receive device updates
Guest users can join guest_access rooms

View file

@ -241,7 +241,6 @@ Inbound federation can receive v2 /send_join
Message history can be paginated Message history can be paginated
Backfill works correctly with history visibility set to joined Backfill works correctly with history visibility set to joined
Guest user cannot call /events globally Guest user cannot call /events globally
Guest users can join guest_access rooms
Guest user can set display names Guest user can set display names
Guest user cannot upgrade other users Guest user cannot upgrade other users
Guest non-joined user cannot call /events on shared room Guest non-joined user cannot call /events on shared room