summaryrefslogtreecommitdiffstats
path: root/bridge/slack
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-02-02 23:16:10 +0100
committerWim <wim@42.be>2018-02-02 23:16:10 +0100
commit78f1011f529981bab58556d9847488db04d00388 (patch)
treedffc0f6352eb60909f7e59e473235156b740fc41 /bridge/slack
parent67f625761785bdd1daf7101668f4853adacdd694 (diff)
downloadmatterbridge-msglm-78f1011f529981bab58556d9847488db04d00388.tar.gz
matterbridge-msglm-78f1011f529981bab58556d9847488db04d00388.tar.bz2
matterbridge-msglm-78f1011f529981bab58556d9847488db04d00388.zip
Add support for file comments (slack). Closes #346
Diffstat (limited to 'bridge/slack')
-rw-r--r--bridge/slack/slack.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go
index f7001568..e040e9dd 100644
--- a/bridge/slack/slack.go
+++ b/bridge/slack/slack.go
@@ -340,7 +340,7 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
continue
}
m := &MMMessage{}
- if ev.BotID == "" && ev.SubType != "message_deleted" {
+ if ev.BotID == "" && ev.SubType != "message_deleted" && ev.SubType != "file_comment" {
user, err := b.rtm.GetUserInfo(ev.User)
if err != nil {
continue
@@ -380,6 +380,11 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
m.UserID = bot.ID
}
}
+
+ if ev.SubType == "file_comment" {
+ m.Username = "system"
+ }
+
mchan <- m
case *slack.OutgoingErrorEvent:
flog.Debugf("%#v", ev.Error())