mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-13 09:03:10 +01:00
Don't rewrite name templates when saving config
Advanced template stuff isn't preserved if you execute them
This commit is contained in:
parent
4e03361df6
commit
a19239b936
1 changed files with 0 additions and 11 deletions
|
@ -86,17 +86,6 @@ func (bc BridgeConfig) FormatUsername(userID types.WhatsAppID) string {
|
|||
return buf.String()
|
||||
}
|
||||
|
||||
func (bc BridgeConfig) MarshalYAML() (interface{}, error) {
|
||||
bc.DisplaynameTemplate, _ = bc.FormatDisplayname(whatsapp.Contact{
|
||||
Jid: "{{.Jid}}",
|
||||
Notify: "{{.Notify}}",
|
||||
Name: "{{.Name}}",
|
||||
Short: "{{.Short}}",
|
||||
})
|
||||
bc.UsernameTemplate = bc.FormatUsername("{{.}}")
|
||||
return bc, nil
|
||||
}
|
||||
|
||||
type PermissionConfig map[string]PermissionLevel
|
||||
|
||||
type PermissionLevel int
|
||||
|
|
Loading…
Reference in a new issue