}
fmt.Printf("\a%s <%s> %s%s\n", m["Created"][0], m["Sender"][0], tag, m["Text"][0])
tag += "[FILE] "
- for _, fileId := range m["File"] {
- fmt.Printf("\a%s <%s> %s%s\n", m["Created"][0], m["Sender"][0], tag, fileId)
+ for i, fileId := range m["File"] {
+ fmt.Printf(
+ "\a%s <%s> %s%s (%s)\n",
+ m["Created"][0], m["Sender"][0], tag, fileId, m["FileName"][i],
+ )
}
}
}
if post.P.Metadata != nil {
for _, fi := range post.P.Metadata.Files {
- fields = append(fields, recfile.Field{Name: "File", Value: fi.Id})
+ fields = append(
+ fields,
+ recfile.Field{Name: "File", Value: fi.Id},
+ recfile.Field{Name: "FileName", Value: fi.Name},
+ )
}
}
if _, err = w.WriteFields(fields...); err != nil {