diff options
Diffstat (limited to 'persistence/sessions.go')
-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 c0750a3..1658cc9 100644 --- a/persistence/sessions.go +++ b/persistence/sessions.go @@ -41,6 +41,7 @@ type Session struct { AsciiArrows bool `yaml:":asciiarrows"` OOBMode bool `yaml:":oobmode"` Carbons bool `yaml:":carbons"` + HideIds bool `yaml:":hideids"` } var configKeys = []string{ @@ -50,6 +51,7 @@ var configKeys = []string{ "asciiarrows", "oobmode", "carbons", + "hideids", } var sessionDB *SessionsYamlDB @@ -126,6 +128,8 @@ func (s *Session) Get(key string) (string, error) { return fromBool(s.OOBMode), nil case "carbons": return fromBool(s.Carbons), nil + case "hideids": + return fromBool(s.HideIds), nil } return "", errors.New("Unknown session property") @@ -183,6 +187,13 @@ func (s *Session) Set(key string, value string) (string, error) { } s.Carbons = b return value, nil + case "hideids": + b, err := toBool(value) + if err != nil { + return "", err + } + s.HideIds = b + return value, nil } return "", errors.New("Unknown session property") |