summaryrefslogtreecommitdiffstats
path: root/gateway/samechannel/samechannel.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-03-28 23:56:58 +0200
committerWim <wim@42.be>2017-03-28 23:56:58 +0200
commit2e4d58cb921afe074e761285b311963ba5f358c6 (patch)
treed535c6b5ef208830bf01bb5806539624c28654e7 /gateway/samechannel/samechannel.go
parent02d7e2db65a954256fc6a66d7bb6a0d769c883df (diff)
downloadmatterbridge-msglm-2e4d58cb921afe074e761285b311963ba5f358c6.tar.gz
matterbridge-msglm-2e4d58cb921afe074e761285b311963ba5f358c6.tar.bz2
matterbridge-msglm-2e4d58cb921afe074e761285b311963ba5f358c6.zip
Refactor
Diffstat (limited to 'gateway/samechannel/samechannel.go')
-rw-r--r--gateway/samechannel/samechannel.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/gateway/samechannel/samechannel.go b/gateway/samechannel/samechannel.go
index 47bdfca1..22f37e67 100644
--- a/gateway/samechannel/samechannel.go
+++ b/gateway/samechannel/samechannel.go
@@ -41,9 +41,11 @@ func (sgw *SameChannelGateway) validChannel(channel string) bool {
return false
}
-func (sgw *SameChannelGateway) getDestChannel(msg *config.Message, dest string) []string {
+func (sgw *SameChannelGateway) getDestChannel(msg *config.Message, dest string) []config.ChannelInfo {
+ var channels []config.ChannelInfo
if sgw.validChannel(msg.Channel) {
- return []string{msg.Channel}
+ channels = append(channels, config.ChannelInfo{Name: msg.Channel, Account: dest, ID: msg.Channel + dest})
+ return channels
}
- return []string{}
+ return channels
}