aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-05 14:32:49 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-05 14:32:49 +0200
commit473336f0eb71613749c36aaa9ff4179fcb0c14a0 (patch)
treec8f8369f6ddf6c5223851cefcb91e5063b35de96
parent88e435052ca831e099e1b7c6a108f1a0fb2596cb (diff)
downloadeasybridge-473336f0eb71613749c36aaa9ff4179fcb0c14a0.tar.gz
easybridge-473336f0eb71613749c36aaa9ff4179fcb0c14a0.zip
Fix null pointer dereference error
-rw-r--r--connector/mattermost/mattermost.go2
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{