5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-21 17:00:27 +00:00

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

This commit is contained in:
Wim 2023-03-11 18:55:29 +01:00 committed by GitHub
parent f345eeae55
commit 8587fa8585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}
}