aboutsummaryrefslogtreecommitdiff
path: root/telegabber.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-06-03 07:20:03 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-06-03 07:20:03 +0300
commit9a84e9a8b6b7a6f953301e54f19cdf4be73592e1 (patch)
tree33e96558211827f696868815222e2d36abbd8fcb /telegabber.go
parent8663a29e157aae6e68cc880a86b3a666da37bfc9 (diff)
Store message ids in Badger DB
Diffstat (limited to 'telegabber.go')
-rw-r--r--telegabber.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/telegabber.go b/telegabber.go
index c8d6a8f..d133d80 100644
--- a/telegabber.go
+++ b/telegabber.go
@@ -35,6 +35,8 @@ func main() {
var configPath = flag.String("config", "config.yml", "Config file path")
// JSON schema (not for editing by a user)
var schemaPath = flag.String("schema", "./config_schema.json", "Schema file path")
+ // Folder for Badger DB of message ids
+ var idsPath = flag.String("ids", "ids", "Ids folder path")
var versionFlag = flag.Bool("version", false, "Print the version and exit")
flag.Parse()
@@ -62,7 +64,7 @@ func main() {
log.Infof("Starting telegabber version %v", version)
- sm, component, err = xmpp.NewComponent(config.XMPP, config.Telegram)
+ sm, component, err = xmpp.NewComponent(config.XMPP, config.Telegram, *idsPath)
if err != nil {
log.Fatal(err)
}