mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-26 04:21:38 +00:00
Add support for file comments (slack). Closes #346
This commit is contained in:
parent
67f6257617
commit
78f1011f52
@ -340,7 +340,7 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
m := &MMMessage{}
|
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)
|
user, err := b.rtm.GetUserInfo(ev.User)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
@ -380,6 +380,11 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
|
|||||||
m.UserID = bot.ID
|
m.UserID = bot.ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ev.SubType == "file_comment" {
|
||||||
|
m.Username = "system"
|
||||||
|
}
|
||||||
|
|
||||||
mchan <- m
|
mchan <- m
|
||||||
case *slack.OutgoingErrorEvent:
|
case *slack.OutgoingErrorEvent:
|
||||||
flog.Debugf("%#v", ev.Error())
|
flog.Debugf("%#v", ev.Error())
|
||||||
|
Loading…
Reference in New Issue
Block a user