Add configuration for phone home stats

This commit is contained in:
Till Faelligen 2022-03-03 10:52:53 +01:00
parent 5ffb386a25
commit 8e5f913e0b
2 changed files with 7 additions and 0 deletions

View file

@ -68,6 +68,9 @@ global:
# to other servers and the federation API will not be exposed.
disable_federation: false
# Whether this instance sends anonymous usage stats
report_stats: false
# Server notices allows server admins to send messages to all users.
server_notices:
enabled: false

View file

@ -60,6 +60,9 @@ type Global struct {
// ServerNotices configuration used for sending server notices
ServerNotices ServerNotices `yaml:"server_notices"`
// ReportStats configures anonymous usage stats of the server
ReportStats bool `yaml:"report_stats"`
}
func (c *Global) Defaults(generate bool) {
@ -70,6 +73,7 @@ func (c *Global) Defaults(generate bool) {
c.KeyID = "ed25519:auto"
}
c.KeyValidityPeriod = time.Hour * 24 * 7
c.ReportStats = false
c.JetStream.Defaults(generate)
c.Metrics.Defaults(generate)