summaryrefslogtreecommitdiffstats
path: root/gateway/samechannel/samechannel.go
diff options
context:
space:
mode:
authorDuco van Amstel <duco.vanamstel@gmail.com>2018-11-13 22:30:56 +0000
committerWim <wim@42.be>2018-11-13 23:30:56 +0100
commit16d5aeac7c2de010d30cddc90c5755ac5b989b2b (patch)
tree9d95ee605be7d287e49212053ac19f88842133a8 /gateway/samechannel/samechannel.go
parente19ba5a06ad94c389df1b253d30c9ba6e4d14273 (diff)
downloadmatterbridge-msglm-16d5aeac7c2de010d30cddc90c5755ac5b989b2b.tar.gz
matterbridge-msglm-16d5aeac7c2de010d30cddc90c5755ac5b989b2b.tar.bz2
matterbridge-msglm-16d5aeac7c2de010d30cddc90c5755ac5b989b2b.zip
Make config.Config more unit-test friendly (#586)
Diffstat (limited to 'gateway/samechannel/samechannel.go')
-rw-r--r--gateway/samechannel/samechannel.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/gateway/samechannel/samechannel.go b/gateway/samechannel/samechannel.go
index 937d769b..ea846e92 100644
--- a/gateway/samechannel/samechannel.go
+++ b/gateway/samechannel/samechannel.go
@@ -5,17 +5,17 @@ import (
)
type SameChannelGateway struct {
- *config.Config
+ config.Config
}
-func New(cfg *config.Config) *SameChannelGateway {
+func New(cfg config.Config) *SameChannelGateway {
return &SameChannelGateway{Config: cfg}
}
func (sgw *SameChannelGateway) GetConfig() []config.Gateway {
var gwconfigs []config.Gateway
cfg := sgw.Config
- for _, gw := range cfg.SameChannelGateway {
+ for _, gw := range cfg.ConfigValues().SameChannelGateway {
gwconfig := config.Gateway{Name: gw.Name, Enable: gw.Enable}
for _, account := range gw.Accounts {
for _, channel := range gw.Channels {