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/gitter/gitter.go | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'bridge/gitter') diff --git a/bridge/gitter/gitter.go b/bridge/gitter/gitter.go index 64b6344f..fce58c1f 100644 --- a/bridge/gitter/gitter.go +++ b/bridge/gitter/gitter.go @@ -9,13 +9,11 @@ import ( ) type Bgitter struct { - c *gitter.Gitter - Config *config.Protocol - Remote chan config.Message - Account string - User *gitter.User - Users []gitter.User - Rooms []gitter.Room + c *gitter.Gitter + User *gitter.User + Users []gitter.User + Rooms []gitter.Room + *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) *Bgitter { - b := &Bgitter{} - b.Config = &cfg - b.Remote = c - b.Account = account - return b +func New(cfg *config.BridgeConfig) *Bgitter { + return &Bgitter{BridgeConfig: cfg} } func (b *Bgitter) Connect() error { -- cgit v1.2.3