mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-19 17:42:35 +01:00
Add channel_purpose to ShowTopicChange. Ignore (un)pinned_item (slack). #353
This commit is contained in:
parent
80822b7fff
commit
0bcd1e62f3
@ -304,7 +304,7 @@ func (b *Bslack) handleSlack() {
|
|||||||
msg.Event = config.EVENT_MSG_DELETE
|
msg.Event = config.EVENT_MSG_DELETE
|
||||||
msg.ID = "slack " + message.Raw.DeletedTimestamp
|
msg.ID = "slack " + message.Raw.DeletedTimestamp
|
||||||
}
|
}
|
||||||
if message.Raw.SubType == "channel_topic" {
|
if message.Raw.SubType == "channel_topic" || message.Raw.SubType == "channel_purpose" {
|
||||||
msg.Event = config.EVENT_TOPIC_CHANGE
|
msg.Event = config.EVENT_TOPIC_CHANGE
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,6 +342,9 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
|
|||||||
}
|
}
|
||||||
switch ev := msg.Data.(type) {
|
switch ev := msg.Data.(type) {
|
||||||
case *slack.MessageEvent:
|
case *slack.MessageEvent:
|
||||||
|
if ev.SubType == "pinned_item" || ev.SubType == "unpinned_item" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if len(ev.Attachments) > 0 {
|
if len(ev.Attachments) > 0 {
|
||||||
// skip messages we made ourselves
|
// skip messages we made ourselves
|
||||||
if ev.Attachments[0].CallbackID == "matterbridge" {
|
if ev.Attachments[0].CallbackID == "matterbridge" {
|
||||||
|
Loading…
Reference in New Issue
Block a user