aboutsummaryrefslogblamecommitdiff
path: root/telegabber.go
blob: c5ee3666ef514666321d7ab62602f843c1086e82 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                    



                                                             

             
                                                                



                              
                                            



                                  
package main

import (
	"log"

	"dev.narayana.im/narayana/telegabber/config"
	"dev.narayana.im/narayana/telegabber/xmpp"
)

// YAML config, compatible with the format of Zhabogram 2.0.0
const configPath string = "config.yml"
// JSON schema (not for editing by a user)
const schemaPath string = "./config_schema.json"

func main() {
	config, err := config.ReadConfig(configPath, schemaPath)
	if err != nil {
		log.Fatal(err)
	}

	cm := xmpp.NewComponent(config.XMPP)

	// reconnect automatically
	log.Fatal(cm.Run())
}