Fix null pointer dereference error
This commit is contained in:
parent
88e435052c
commit
473336f0eb
1 changed files with 1 additions and 1 deletions
|
@ -607,7 +607,7 @@ func (mm *Mattermost) handlePost(channel_name string, post *model.Post, only_mes
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle files
|
// Handle files
|
||||||
if post.FileIds != nil && len(post.FileIds) > 0 {
|
if post.Metadata != nil && post.Metadata.Files != nil {
|
||||||
msg_ev.Attachments = []SMediaObject{}
|
msg_ev.Attachments = []SMediaObject{}
|
||||||
for _, file := range post.Metadata.Files {
|
for _, file := range post.Metadata.Files {
|
||||||
media_object := &LazyBlobMediaObject{
|
media_object := &LazyBlobMediaObject{
|
||||||
|
|
Loading…
Reference in a new issue