mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-09 15:40:27 +00:00
Fix panic on nil message.Post (mattermost). Fixes #804
This commit is contained in:
parent
8ad2be10b2
commit
9b520dfb78
@ -186,6 +186,12 @@ func (b *Bmattermost) skipMessage(message *matterclient.Message) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Ignore non-post messages
|
||||
if message.Post == nil {
|
||||
b.Log.Debugf("ignoring nil message.Post: %#v", message)
|
||||
return true
|
||||
}
|
||||
|
||||
// Ignore messages sent from matterbridge
|
||||
if message.Post.Props != nil {
|
||||
if _, ok := message.Post.Props["matterbridge_"+b.uuid].(bool); ok {
|
||||
|
Loading…
Reference in New Issue
Block a user