aboutsummaryrefslogtreecommitdiff
path: root/persistence
diff options
context:
space:
mode:
Diffstat (limited to 'persistence')
-rw-r--r--persistence/sessions.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/persistence/sessions.go b/persistence/sessions.go
index ed95f60..c0750a3 100644
--- a/persistence/sessions.go
+++ b/persistence/sessions.go
@@ -40,6 +40,7 @@ type Session struct {
RawMessages bool `yaml:":rawmessages"`
AsciiArrows bool `yaml:":asciiarrows"`
OOBMode bool `yaml:":oobmode"`
+ Carbons bool `yaml:":carbons"`
}
var configKeys = []string{
@@ -48,6 +49,7 @@ var configKeys = []string{
"rawmessages",
"asciiarrows",
"oobmode",
+ "carbons",
}
var sessionDB *SessionsYamlDB
@@ -122,6 +124,8 @@ func (s *Session) Get(key string) (string, error) {
return fromBool(s.AsciiArrows), nil
case "oobmode":
return fromBool(s.OOBMode), nil
+ case "carbons":
+ return fromBool(s.Carbons), nil
}
return "", errors.New("Unknown session property")
@@ -172,6 +176,13 @@ func (s *Session) Set(key string, value string) (string, error) {
}
s.OOBMode = b
return value, nil
+ case "carbons":
+ b, err := toBool(value)
+ if err != nil {
+ return "", err
+ }
+ s.Carbons = b
+ return value, nil
}
return "", errors.New("Unknown session property")