From 8587fa85854b8ba14a171edf1c9c7e8f066eb6fb Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 11 Mar 2023 18:55:29 +0100 Subject: [PATCH] Fix possible panic in mattermost. (mattermost) Fixes #1947 (#2014) --- bridge/mattermost/mattermost.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go index 2b44dcfa..be24ba17 100644 --- a/bridge/mattermost/mattermost.go +++ b/bridge/mattermost/mattermost.go @@ -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 } }