diff options
author | Wim <wim@42.be> | 2017-03-28 23:58:22 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-03-28 23:58:22 +0200 |
commit | 1e0490bd36ec20a7de43587f43feb6ec63c02ddb (patch) | |
tree | 56a0aef0270d4f4570392c3428eb48e533eb0939 /gateway/samechannel/samechannel.go | |
parent | 8afc641f0c9dc33195fb48b056f6c11913a10f98 (diff) | |
parent | 2e4d58cb921afe074e761285b311963ba5f358c6 (diff) | |
download | matterbridge-msglm-1e0490bd36ec20a7de43587f43feb6ec63c02ddb.tar.gz matterbridge-msglm-1e0490bd36ec20a7de43587f43feb6ec63c02ddb.tar.bz2 matterbridge-msglm-1e0490bd36ec20a7de43587f43feb6ec63c02ddb.zip |
Merge branch 'channelinfo'
Diffstat (limited to 'gateway/samechannel/samechannel.go')
-rw-r--r-- | gateway/samechannel/samechannel.go | 8 |
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 } |