Change default stats reporting endpoint

This commit is contained in:
Till Faelligen 2023-03-10 12:08:02 +01:00
parent c7303cbf76
commit 57f9ee0618
No known key found for this signature in database
GPG key ID: ACCDC9606D472758
2 changed files with 7 additions and 2 deletions

View file

@ -95,7 +95,7 @@ global:
# We use this information to understand how Dendrite is being used in the wild.
report_stats:
enabled: false
endpoint: https://matrix.org/report-usage-stats/push
endpoint: https://panopticon.matrix.org/push
# Server notices allows server admins to send messages to all users on the server.
server_notices:

View file

@ -319,10 +319,15 @@ type ReportStats struct {
func (c *ReportStats) Defaults() {
c.Enabled = false
c.Endpoint = "https://matrix.org/report-usage-stats/push"
c.Endpoint = "https://panopticon.matrix.org/push"
}
func (c *ReportStats) Verify(configErrs *ConfigErrors) {
// We prefer to hit panopticon (https://github.com/matrix-org/panopticon) directly over
// the "old" matrix.org endpoint.
if c.Endpoint == "https://matrix.org/report-usage-stats/push" {
c.Endpoint = "https://panopticon.matrix.org/push"
}
if c.Enabled {
checkNotEmpty(configErrs, "global.report_stats.endpoint", c.Endpoint)
}