fix prefix; test attachments; add maxsize
This commit is contained in:
@@ -13,9 +13,11 @@ func New() *Config {
|
||||
Homeserver: env.String("homeserver", defaultConfig.Homeserver),
|
||||
Login: env.String("login", defaultConfig.Login),
|
||||
Password: env.String("password", defaultConfig.Password),
|
||||
Prefix: env.String("prefix", defaultConfig.Prefix),
|
||||
Domain: env.String("domain", defaultConfig.Domain),
|
||||
Port: env.String("port", defaultConfig.Port),
|
||||
NoEncryption: env.Bool("noencryption"),
|
||||
MaxSize: env.Int("maxsize", defaultConfig.MaxSize),
|
||||
Sentry: Sentry{
|
||||
DSN: env.String("sentry.dsn", defaultConfig.Sentry.DSN),
|
||||
SampleRate: env.Int("sentry.rate", defaultConfig.Sentry.SampleRate),
|
||||
|
||||
@@ -5,6 +5,7 @@ var defaultConfig = &Config{
|
||||
Domain: "localhost",
|
||||
Port: "25",
|
||||
Prefix: "!pm",
|
||||
MaxSize: 1024,
|
||||
DB: DB{
|
||||
DSN: "local.db",
|
||||
Dialect: "sqlite3",
|
||||
|
||||
@@ -18,6 +18,8 @@ type Config struct {
|
||||
NoEncryption bool
|
||||
// Prefix for commands
|
||||
Prefix string
|
||||
// MaxSize of an email (including attachments)
|
||||
MaxSize int
|
||||
|
||||
// DB config
|
||||
DB DB
|
||||
|
||||
Reference in New Issue
Block a user