diff options
author | Wim <wim@42.be> | 2017-12-19 23:15:03 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-12-19 23:15:03 +0100 |
commit | 265457b45171dcae96a1aac9454e3bda2cd0557a (patch) | |
tree | 35342a6b83e01b708b20442378799c7692fdf519 /bridge/telegram | |
parent | 4a4a29c9f6fe202cf4379c0df2ba313848bb8d11 (diff) | |
download | matterbridge-msglm-265457b45171dcae96a1aac9454e3bda2cd0557a.tar.gz matterbridge-msglm-265457b45171dcae96a1aac9454e3bda2cd0557a.tar.bz2 matterbridge-msglm-265457b45171dcae96a1aac9454e3bda2cd0557a.zip |
Refactor and add MediaDownloadSize to General
Diffstat (limited to 'bridge/telegram')
-rw-r--r-- | bridge/telegram/telegram.go | 14 |
1 files changed, 4 insertions, 10 deletions
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 { |