From 473336f0eb71613749c36aaa9ff4179fcb0c14a0 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 5 Apr 2020 14:32:49 +0200 Subject: Fix null pointer dereference error --- connector/mattermost/mattermost.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'connector/mattermost') 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{ -- cgit v1.2.3