mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-12-24 18:25:40 +00:00
Suppress parent message when child message is received (slack) (#218)
* Suppress parent message when child message is received When a thread is started in Slack and a user makes a comment on the thread, matterbridge sends the original parent message again on each child comment. This change suppresses that. * Update slack.go Moved determination of ThreadTimestamp to handleSlackClient so the MMMessage struct doesn't need to be modified * Ran 'go fmt'
This commit is contained in:
parent
caaf6f3012
commit
cc5ce3d5ae
@ -241,7 +241,7 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
|
||||
// ignore first message
|
||||
if count > 0 {
|
||||
flog.Debugf("Receiving from slackclient %#v", ev)
|
||||
if !b.Config.EditDisable && ev.SubMessage != nil {
|
||||
if !b.Config.EditDisable && ev.SubMessage != nil && ev.SubMessage.ThreadTimestamp != ev.SubMessage.Timestamp {
|
||||
flog.Debugf("SubMessage %#v", ev.SubMessage)
|
||||
ev.User = ev.SubMessage.User
|
||||
ev.Text = ev.SubMessage.Text + b.Config.EditSuffix
|
||||
|
Loading…
Reference in New Issue
Block a user