diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-05 14:32:49 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-05 14:32:49 +0200 |
commit | 473336f0eb71613749c36aaa9ff4179fcb0c14a0 (patch) | |
tree | c8f8369f6ddf6c5223851cefcb91e5063b35de96 /connector/mattermost | |
parent | 88e435052ca831e099e1b7c6a108f1a0fb2596cb (diff) | |
download | easybridge-473336f0eb71613749c36aaa9ff4179fcb0c14a0.tar.gz easybridge-473336f0eb71613749c36aaa9ff4179fcb0c14a0.zip |
Fix null pointer dereference error
Diffstat (limited to 'connector/mattermost')
-rw-r--r-- | connector/mattermost/mattermost.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/connector/mattermost/mattermost.go b/connector/mattermost/mattermost.go index ea8377c..5ec76d0 100644 --- a/connector/mattermost/mattermost.go +++ b/connector/mattermost/mattermost.go @@ -607,7 +607,7 @@ func (mm *Mattermost) handlePost(channel_name string, post *model.Post, only_mes } // Handle files - if post.FileIds != nil && len(post.FileIds) > 0 { + if post.Metadata != nil && post.Metadata.Files != nil { msg_ev.Attachments = []SMediaObject{} for _, file := range post.Metadata.Files { media_object := &LazyBlobMediaObject{ |