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









                                                    
                                                 

             
                                                                  



                              




                                            
package main

import (
	"log"

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

const CONFIG_PATH string = "config.yml"
const SCHEMA_PATH string = "./config_schema.json"

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

	cm := xmpp.NewComponent(config.Xmpp)

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