5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-25 09:51:36 +00:00

Fix sending to different channels on same account (slack). Closes #177

This commit is contained in:
Wim 2017-05-24 22:10:21 +02:00
parent f065e9e4d5
commit 87229bab13
2 changed files with 2 additions and 4 deletions

View File

@ -89,9 +89,6 @@ func (b *Bslack) JoinChannel(channel string) error {
func (b *Bslack) Send(msg config.Message) error {
flog.Debugf("Receiving %#v", msg)
if msg.Account == b.Account {
return nil
}
nick := msg.Username
message := msg.Text
channel := msg.Channel

View File

@ -192,9 +192,10 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) {
return
}
originchannel := msg.Channel
origmsg := msg
for _, channel := range gw.DestChannelFunc(&msg, *dest) {
// do not send to ourself
if channel.ID == getChannelID(msg) {
if channel.ID == getChannelID(origmsg) {
continue
}
log.Debugf("Sending %#v from %s (%s) to %s (%s)", msg, msg.Account, originchannel, dest.Account, channel.Name)