diff options
Diffstat (limited to 'persistence')
-rw-r--r-- | persistence/sessions.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/persistence/sessions.go b/persistence/sessions.go index 56ff152..29c4918 100644 --- a/persistence/sessions.go +++ b/persistence/sessions.go @@ -43,6 +43,7 @@ type Session struct { Carbons bool `yaml:":carbons"` HideIds bool `yaml:":hideids"` Receipts bool `yaml:":receipts"` + NativeEdits bool `yaml:":nativeedits"` } var configKeys = []string{ @@ -54,6 +55,7 @@ var configKeys = []string{ "carbons", "hideids", "receipts", + "nativeedits", } var sessionDB *SessionsYamlDB @@ -134,6 +136,8 @@ func (s *Session) Get(key string) (string, error) { return fromBool(s.HideIds), nil case "receipts": return fromBool(s.Receipts), nil + case "nativeedits": + return fromBool(s.NativeEdits), nil } return "", errors.New("Unknown session property") @@ -205,6 +209,13 @@ func (s *Session) Set(key string, value string) (string, error) { } s.Receipts = b return value, nil + case "nativeedits": + b, err := toBool(value) + if err != nil { + return "", err + } + s.NativeEdits = b + return value, nil } return "", errors.New("Unknown session property") |