diff --git a/app/chat/export.go b/app/chat/export.go index f2c9aa0770..a4b6c15840 100644 --- a/app/chat/export.go +++ b/app/chat/export.go @@ -200,10 +200,14 @@ func Export(ctx context.Context, opts *ExportOptions) error { if opts.Raw { jsonMessage = m } else { + fileName := "" + if media != nil { // #207 + fileName = media.Name + } t := &Message{ ID: m.ID, Type: "message", - File: media.Name, + File: fileName, } if opts.WithContent { t.Date = m.Date