Merge remote-tracking branch 'beeper/main'
This commit is contained in:
@@ -30,6 +30,8 @@ type bridge struct {
|
||||
DoublePuppetAllowDiscovery bool `yaml:"double_puppet_allow_discovery"`
|
||||
LoginSharedSecretMap map[string]string `yaml:"login_shared_secret_map"`
|
||||
|
||||
Encryption encryption `yaml:"encryption"`
|
||||
|
||||
usernameTemplate *template.Template `yaml:"-"`
|
||||
displaynameTemplate *template.Template `yaml:"-"`
|
||||
channelnameTemplate *template.Template `yaml:"-"`
|
||||
|
||||
29
config/encryption.go
Normal file
29
config/encryption.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package config
|
||||
|
||||
type encryption struct {
|
||||
Allow bool `yaml:"allow"`
|
||||
Default bool `yaml:"default"`
|
||||
|
||||
KeySharing struct {
|
||||
Allow bool `yaml:"allow"`
|
||||
RequireCrossSigning bool `yaml:"require_cross_signing"`
|
||||
RequireVerification bool `yaml:"require_verification"`
|
||||
} `yaml:"key_sharing"`
|
||||
}
|
||||
|
||||
func (e *encryption) validate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *encryption) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
type rawEncryption encryption
|
||||
|
||||
raw := rawEncryption{}
|
||||
if err := unmarshal(&raw); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*e = encryption(raw)
|
||||
|
||||
return e.validate()
|
||||
}
|
||||
@@ -14,6 +14,7 @@ type homeserver struct {
|
||||
Domain string `yaml:"domain"`
|
||||
Asmux bool `yaml:"asmux"`
|
||||
StatusEndpoint string `yaml:"status_endpoint"`
|
||||
AsyncMedia bool `yaml:"async_media"`
|
||||
}
|
||||
|
||||
func (h *homeserver) validate() error {
|
||||
|
||||
Reference in New Issue
Block a user