trim whitespace when returning from the db

This commit is contained in:
Aaron Bieber 2021-03-28 14:25:58 -06:00
parent 5254b1547a
commit e90e928943

View File

@ -8,6 +8,7 @@ import (
"log" "log"
"os" "os"
"path" "path"
"strings"
"github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrix"
) )
@ -64,7 +65,7 @@ func (s FStore) Get(key string) (string, error) {
if err != nil { if err != nil {
return "", nil return "", nil
} }
return string(data), nil return strings.TrimSpace(string(data)), nil
} }
// SaveFilterID exposed for gomatrix // SaveFilterID exposed for gomatrix