summaryrefslogtreecommitdiffstats
path: root/bridge/mattermost
diff options
context:
space:
mode:
authorWim <wim@42.be>2023-03-11 18:55:29 +0100
committerGitHub <noreply@github.com>2023-03-11 18:55:29 +0100
commit8587fa85854b8ba14a171edf1c9c7e8f066eb6fb (patch)
tree255a0e0effd081809e1c9497470d7be05e3a7c33 /bridge/mattermost
parentf345eeae55232ddd7cf800c8303b4298fb1b8c52 (diff)
downloadmatterbridge-msglm-8587fa85854b8ba14a171edf1c9c7e8f066eb6fb.tar.gz
matterbridge-msglm-8587fa85854b8ba14a171edf1c9c7e8f066eb6fb.tar.bz2
matterbridge-msglm-8587fa85854b8ba14a171edf1c9c7e8f066eb6fb.zip
Fix possible panic in mattermost. (mattermost) Fixes #1947 (#2014)
Diffstat (limited to 'bridge/mattermost')
-rw-r--r--bridge/mattermost/mattermost.go2
1 files changed, 1 insertions, 1 deletions
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
}
}