Fix possible panic in mattermost. (mattermost) Fixes #1947 (#2014)

pull/1991/head^2
Wim 1 year ago committed by GitHub
parent f345eeae55
commit 8587fa8585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -161,7 +161,7 @@ func (b *Bmattermost) Send(msg config.Message) (string, error) {
if err != nil {
b.Log.Errorf("getting post %s failed: %s", msg.ParentID, err)
}
if post.RootId != "" {
if post != nil && post.RootId != "" {
msg.ParentID = post.RootId
}
}

Loading…
Cancel
Save