mirror of
https://github.com/Unkn0wnCat/matrix-veles.git
synced 2025-07-27 21:37:44 +02:00
Add hash-lists filtering, format code, prepare API
This commit is contained in:
parent
b81af24e50
commit
1b15b12859
11 changed files with 353 additions and 106 deletions
|
@ -18,7 +18,6 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/Unkn0wnCat/matrix-veles/internal/config"
|
||||
"github.com/spf13/viper"
|
||||
"log"
|
||||
"os"
|
||||
|
@ -49,13 +48,16 @@ func Execute() {
|
|||
func init() {
|
||||
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is ./config.yaml)")
|
||||
|
||||
viper.SetDefault("bot.homeserver", "https://matrix.org")
|
||||
viper.SetDefault("bot.homeserver", "matrix.org")
|
||||
viper.SetDefault("bot.homeserver_url", "https://matrix.org")
|
||||
viper.SetDefault("bot.username", "")
|
||||
viper.SetDefault("bot.password", "")
|
||||
viper.SetDefault("bot.accessKey", "")
|
||||
viper.SetDefault("bot.rooms", config.RoomConfigTree{})
|
||||
viper.SetDefault("bot.mongo.uri", "mongodb://localhost:27017")
|
||||
viper.SetDefault("bot.mongo.database", "veles")
|
||||
viper.SetDefault("bot.mongo.collection.entries", "entries")
|
||||
viper.SetDefault("bot.mongo.collection.lists", "lists")
|
||||
viper.SetDefault("bot.mongo.collection.rooms", "rooms")
|
||||
|
||||
cobra.OnInitialize(loadConfig)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue