mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-15 05:20:27 +00:00
Fix panic on nil message.Post (mattermost). Fixes #804
This commit is contained in:
parent
82fe80e52f
commit
1e6a2bc8f7
@ -186,6 +186,12 @@ func (b *Bmattermost) skipMessage(message *matterclient.Message) bool {
|
|||||||
return true
|
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
|
// Ignore messages sent from matterbridge
|
||||||
if message.Post.Props != nil {
|
if message.Post.Props != nil {
|
||||||
if _, ok := message.Post.Props["matterbridge_"+b.uuid].(bool); ok {
|
if _, ok := message.Post.Props["matterbridge_"+b.uuid].(bool); ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user