aboutsummaryrefslogtreecommitdiff
path: root/federationapi/routing/backfill.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-11-15 15:05:23 +0000
committerNeil Alexander <neilalexander@users.noreply.github.com>2022-11-15 15:05:23 +0000
commit6650712a1c0dec282b47b7ba14bc8c2e06a385d8 (patch)
tree12ca755c5c33d3489417f9355dda3f1b7983c779 /federationapi/routing/backfill.go
parentf4ee3977340c84d321767d347795b1dcd05ac459 (diff)
Federation fixes for virtual hosting
Diffstat (limited to 'federationapi/routing/backfill.go')
-rw-r--r--federationapi/routing/backfill.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/federationapi/routing/backfill.go b/federationapi/routing/backfill.go
index 7b9ca66f..272f5e9d 100644
--- a/federationapi/routing/backfill.go
+++ b/federationapi/routing/backfill.go
@@ -82,7 +82,8 @@ func Backfill(
BackwardsExtremities: map[string][]string{
"": eIDs,
},
- ServerName: request.Origin(),
+ ServerName: request.Origin(),
+ VirtualHost: request.Destination(),
}
if req.Limit, err = strconv.Atoi(limit); err != nil {
util.GetLogger(httpReq.Context()).WithError(err).Error("strconv.Atoi failed")
@@ -123,7 +124,7 @@ func Backfill(
}
txn := gomatrixserverlib.Transaction{
- Origin: cfg.Matrix.ServerName,
+ Origin: request.Destination(),
PDUs: eventJSONs,
OriginServerTS: gomatrixserverlib.AsTimestamp(time.Now()),
}