mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-31 10:43:10 -06:00
Add server_notices config
This commit is contained in:
parent
9ac27cabc5
commit
cfe6b2b9a7
|
|
@ -68,6 +68,17 @@ global:
|
||||||
# to other servers and the federation API will not be exposed.
|
# to other servers and the federation API will not be exposed.
|
||||||
disable_federation: false
|
disable_federation: false
|
||||||
|
|
||||||
|
# Server notices allows server admins to send messages to all users.
|
||||||
|
server_notices:
|
||||||
|
# The server localpart to be used when sending notices, ensure this is not yet take
|
||||||
|
local_part: "server"
|
||||||
|
# The displayname to be used when sending notices
|
||||||
|
display_name: "Server alerts"
|
||||||
|
# The avatar of this user
|
||||||
|
avatar: ""
|
||||||
|
# The roomname to be used when creating messages
|
||||||
|
room_name: "Server Alerts"
|
||||||
|
|
||||||
# Configuration for NATS JetStream
|
# Configuration for NATS JetStream
|
||||||
jetstream:
|
jetstream:
|
||||||
# A list of NATS Server addresses to connect to. If none are specified, an
|
# A list of NATS Server addresses to connect to. If none are specified, an
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,9 @@ type Global struct {
|
||||||
|
|
||||||
// DNS caching options for all outbound HTTP requests
|
// DNS caching options for all outbound HTTP requests
|
||||||
DNSCache DNSCacheOptions `yaml:"dns_cache"`
|
DNSCache DNSCacheOptions `yaml:"dns_cache"`
|
||||||
|
|
||||||
|
// ServerNotices configuration used for sending server notices
|
||||||
|
ServerNotices ServerNotices `yaml:"server_notices"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Global) Defaults(generate bool) {
|
func (c *Global) Defaults(generate bool) {
|
||||||
|
|
@ -82,6 +85,7 @@ func (c *Global) Verify(configErrs *ConfigErrors, isMonolith bool) {
|
||||||
c.Metrics.Verify(configErrs, isMonolith)
|
c.Metrics.Verify(configErrs, isMonolith)
|
||||||
c.Sentry.Verify(configErrs, isMonolith)
|
c.Sentry.Verify(configErrs, isMonolith)
|
||||||
c.DNSCache.Verify(configErrs, isMonolith)
|
c.DNSCache.Verify(configErrs, isMonolith)
|
||||||
|
c.ServerNotices.Verify(configErrs, isMonolith)
|
||||||
}
|
}
|
||||||
|
|
||||||
type OldVerifyKeys struct {
|
type OldVerifyKeys struct {
|
||||||
|
|
@ -123,6 +127,29 @@ func (c *Metrics) Defaults(generate bool) {
|
||||||
func (c *Metrics) Verify(configErrs *ConfigErrors, isMonolith bool) {
|
func (c *Metrics) Verify(configErrs *ConfigErrors, isMonolith bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ServerNotices defines the configuration used for sending server notices
|
||||||
|
type ServerNotices struct {
|
||||||
|
// The localpart to be used when sending notices
|
||||||
|
LocalPart string `yaml:"local_part"`
|
||||||
|
// The displayname to be used when sending notices
|
||||||
|
DisplayName string `yaml:"display_name"`
|
||||||
|
// The avatar of this user
|
||||||
|
Avatar string `yaml:"avatar"`
|
||||||
|
// The roomname to be used when creating messages
|
||||||
|
RoomName string `yaml:"room_name"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *ServerNotices) Defaults(generate bool) {
|
||||||
|
if generate {
|
||||||
|
c.LocalPart = "server"
|
||||||
|
c.DisplayName = "Server Alert"
|
||||||
|
c.RoomName = "Server Alert"
|
||||||
|
c.Avatar = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *ServerNotices) Verify(errors *ConfigErrors, isMonolith bool) {}
|
||||||
|
|
||||||
// The configuration to use for Sentry error reporting
|
// The configuration to use for Sentry error reporting
|
||||||
type Sentry struct {
|
type Sentry struct {
|
||||||
Enabled bool `yaml:"enabled"`
|
Enabled bool `yaml:"enabled"`
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,11 @@ global:
|
||||||
basic_auth:
|
basic_auth:
|
||||||
username: metrics
|
username: metrics
|
||||||
password: metrics
|
password: metrics
|
||||||
|
server_notices:
|
||||||
|
local_part: "server"
|
||||||
|
display_name: "Server alerts"
|
||||||
|
avatar: ""
|
||||||
|
room_name: "Server Alerts"
|
||||||
app_service_api:
|
app_service_api:
|
||||||
internal_api:
|
internal_api:
|
||||||
listen: http://localhost:7777
|
listen: http://localhost:7777
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue