Skip to content

Commit

Permalink
fix(export): nil media with --all flag
Browse files Browse the repository at this point in the history
  • Loading branch information
iyear committed Jun 10, 2023
1 parent 212de68 commit c60880f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/chat/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c60880f

Please sign in to comment.