From 265457b45171dcae96a1aac9454e3bda2cd0557a Mon Sep 17 00:00:00 2001 From: Wim Date: Tue, 19 Dec 2017 23:15:03 +0100 Subject: Refactor and add MediaDownloadSize to General --- bridge/telegram/telegram.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'bridge/telegram/telegram.go') diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index 650eec12..95492a88 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -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 { -- cgit v1.2.3