From b3b53b6145c4b8e31d134942507c3ce0226182a4 Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Sun, 15 Jan 2023 20:35:13 -0500 Subject: OOB --- persistence/sessions.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'persistence/sessions.go') diff --git a/persistence/sessions.go b/persistence/sessions.go index bc71fd6..ed95f60 100644 --- a/persistence/sessions.go +++ b/persistence/sessions.go @@ -39,6 +39,7 @@ type Session struct { KeepOnline bool `yaml:":keeponline"` RawMessages bool `yaml:":rawmessages"` AsciiArrows bool `yaml:":asciiarrows"` + OOBMode bool `yaml:":oobmode"` } var configKeys = []string{ @@ -46,6 +47,7 @@ var configKeys = []string{ "keeponline", "rawmessages", "asciiarrows", + "oobmode", } var sessionDB *SessionsYamlDB @@ -118,6 +120,8 @@ func (s *Session) Get(key string) (string, error) { return fromBool(s.RawMessages), nil case "asciiarrows": return fromBool(s.AsciiArrows), nil + case "oobmode": + return fromBool(s.OOBMode), nil } return "", errors.New("Unknown session property") @@ -161,6 +165,13 @@ func (s *Session) Set(key string, value string) (string, error) { } s.AsciiArrows = b return value, nil + case "oobmode": + b, err := toBool(value) + if err != nil { + return "", err + } + s.OOBMode = b + return value, nil } return "", errors.New("Unknown session property") -- cgit v1.2.3