aboutsummaryrefslogtreecommitdiff
path: root/persistence/sessions.go
diff options
context:
space:
mode:
Diffstat (limited to 'persistence/sessions.go')
-rw-r--r--persistence/sessions.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/persistence/sessions.go b/persistence/sessions.go
index 1658cc9..56ff152 100644
--- a/persistence/sessions.go
+++ b/persistence/sessions.go
@@ -42,6 +42,7 @@ type Session struct {
OOBMode bool `yaml:":oobmode"`
Carbons bool `yaml:":carbons"`
HideIds bool `yaml:":hideids"`
+ Receipts bool `yaml:":receipts"`
}
var configKeys = []string{
@@ -52,6 +53,7 @@ var configKeys = []string{
"oobmode",
"carbons",
"hideids",
+ "receipts",
}
var sessionDB *SessionsYamlDB
@@ -130,6 +132,8 @@ func (s *Session) Get(key string) (string, error) {
return fromBool(s.Carbons), nil
case "hideids":
return fromBool(s.HideIds), nil
+ case "receipts":
+ return fromBool(s.Receipts), nil
}
return "", errors.New("Unknown session property")
@@ -194,6 +198,13 @@ func (s *Session) Set(key string, value string) (string, error) {
}
s.HideIds = b
return value, nil
+ case "receipts":
+ b, err := toBool(value)
+ if err != nil {
+ return "", err
+ }
+ s.Receipts = b
+ return value, nil
}
return "", errors.New("Unknown session property")