aboutsummaryrefslogtreecommitdiff
path: root/federationapi
diff options
context:
space:
mode:
authorTill Faelligen <2353100+S7evinK@users.noreply.github.com>2022-09-16 13:30:20 +0200
committerTill Faelligen <2353100+S7evinK@users.noreply.github.com>2022-09-16 13:30:20 +0200
commit7bfc3074d10b2cd91b37290e39d3882119853107 (patch)
treef757739ebededa1e4de64058ac9416170d1f52bb /federationapi
parentfc1d8e479b282b56dd0eb707559785dc20fc65a6 (diff)
Fix origin on device list update EDUs
Diffstat (limited to 'federationapi')
-rw-r--r--federationapi/producers/syncapi.go4
-rw-r--r--federationapi/routing/send.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/federationapi/producers/syncapi.go b/federationapi/producers/syncapi.go
index 4abd3fbe..659ff1bc 100644
--- a/federationapi/producers/syncapi.go
+++ b/federationapi/producers/syncapi.go
@@ -163,10 +163,10 @@ func (p *SyncAPIProducer) SendPresence(
}
func (p *SyncAPIProducer) SendDeviceListUpdate(
- ctx context.Context, deviceListUpdate gomatrixserverlib.RawJSON, origin string,
+ ctx context.Context, deviceListUpdate gomatrixserverlib.RawJSON, origin gomatrixserverlib.ServerName,
) (err error) {
m := nats.NewMsg(p.TopicDeviceListUpdate)
- m.Header.Set("origin", origin)
+ m.Header.Set("origin", string(origin))
m.Data = deviceListUpdate
log.Debugf("Sending device list update: %+v", m.Header)
_, err = p.JetStream.PublishMsg(m, nats.Context(ctx))
diff --git a/federationapi/routing/send.go b/federationapi/routing/send.go
index a9714c65..060af676 100644
--- a/federationapi/routing/send.go
+++ b/federationapi/routing/send.go
@@ -359,7 +359,7 @@ func (t *txnReq) processEDUs(ctx context.Context) {
}
}
case gomatrixserverlib.MDeviceListUpdate:
- if err := t.producer.SendDeviceListUpdate(ctx, e.Content, e.Origin); err != nil {
+ if err := t.producer.SendDeviceListUpdate(ctx, e.Content, t.Origin); err != nil {
util.GetLogger(ctx).WithError(err).Error("failed to InputDeviceListUpdate")
}
case gomatrixserverlib.MReceipt: