瀏覽代碼

Don't rewrite name templates when saving config

Advanced template stuff isn't preserved if you execute them
Tulir Asokan 6 年之前
父節點
當前提交
a19239b936
共有 1 個文件被更改,包括 0 次插入11 次删除
  1. 0 11
      config/bridge.go

+ 0 - 11
config/bridge.go

@@ -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