4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 21:19:22 +00:00

Refactor and add MediaDownloadSize to General

This commit is contained in:
Wim
2017-12-19 23:15:03 +01:00
parent 4a4a29c9f6
commit 265457b451
14 changed files with 80 additions and 131 deletions

View File

@ -12,10 +12,8 @@ import (
)
type Btelegram struct {
c *tgbotapi.BotAPI
Config *config.Protocol
Remote chan config.Message
Account string
c *tgbotapi.BotAPI
*config.BridgeConfig
}
var flog *log.Entry
@ -25,12 +23,8 @@ func init() {
flog = log.WithFields(log.Fields{"module": protocol})
}
func New(cfg config.Protocol, account string, c chan config.Message) *Btelegram {
b := &Btelegram{}
b.Config = &cfg
b.Remote = c
b.Account = account
return b
func New(cfg *config.BridgeConfig) *Btelegram {
return &Btelegram{BridgeConfig: cfg}
}
func (b *Btelegram) Connect() error {