mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-04 20:52:54 +01:00
Add config.PostProcess
method
This makes it possible to create and modify the config instance in another project.
This commit is contained in:
parent
905f9ff976
commit
b821d83eee
1 changed files with 5 additions and 4 deletions
|
@ -75,12 +75,13 @@ func (c *Config) UnmarshalYAML(node *yaml.Node) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return c.PostProcess()
|
||||
}
|
||||
|
||||
func (c *Config) PostProcess() error {
|
||||
var err error
|
||||
c.displaynameTemplate, err = template.New("displayname").Parse(c.DisplaynameTemplate)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
|
||||
func upgradeConfig(helper up.Helper) {
|
||||
|
|
Loading…
Reference in a new issue