summaryrefslogtreecommitdiffstats
path: root/bridge/slack
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-04-13 22:01:03 +0200
committerWim <wim@42.be>2018-04-13 22:01:03 +0200
commit68fbed92819f83e282af6394e568446b63158257 (patch)
tree1c241c5e5c1cd4ec692be7ccb9fdd4d077ef43e5 /bridge/slack
parent8bfaa007d5200e0b30b59a3fcccdbed8f39f571c (diff)
downloadmatterbridge-msglm-68fbed92819f83e282af6394e568446b63158257.tar.gz
matterbridge-msglm-68fbed92819f83e282af6394e568446b63158257.tar.bz2
matterbridge-msglm-68fbed92819f83e282af6394e568446b63158257.zip
Make our callbackid more unique. Fixes issue with running multiple matterbridge on the same channel (slack,mattermost)
Diffstat (limited to 'bridge/slack')
-rw-r--r--bridge/slack/slack.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go
index 7706f2bf..7d413337 100644
--- a/bridge/slack/slack.go
+++ b/bridge/slack/slack.go
@@ -177,7 +177,7 @@ func (b *Bslack) Send(msg config.Message) (string, error) {
np.IconURL = msg.Avatar
}
// add a callback ID so we can see we created it
- np.Attachments = append(np.Attachments, slack.Attachment{CallbackID: "matterbridge"})
+ np.Attachments = append(np.Attachments, slack.Attachment{CallbackID: "matterbridge_" + b.si.User.ID})
// add file attachments
np.Attachments = append(np.Attachments, b.createAttach(msg.Extra)...)
// add slack attachments (from another slack bridge)
@@ -644,7 +644,7 @@ func (b *Bslack) skipMessageEvent(ev *slack.MessageEvent) bool {
// skip messages we made ourselves
if len(ev.Attachments) > 0 {
- if ev.Attachments[0].CallbackID == "matterbridge" {
+ if ev.Attachments[0].CallbackID == "matterbridge_"+b.si.User.ID {
return true
}
}