\n"
var dateTitle = format.full(item.timestamp)
if let edited = item.editedTimestamp {
dateTitle += "\n" + GGStrings.ChatExport.Output.edited(date: format.full(edited))
}
html += "
\(GGChatExportEscape.html(format.time(item.timestamp)))
\n"
if !joined {
html += "
\(GGChatExportEscape.html(item.authorName))
\n"
}
if let forwardedFrom = item.forwardedFrom {
html += "
\(GGChatExportEscape.html(GGStrings.ChatExport.Output.forwarded(name: forwardedFrom)))
\n"
}
if let replyToId = item.replyToId {
html += "
\n"
}
if let media = item.media {
html += "
\(GGChatExportHTML.media(media, format: format))
\n"
}
if let contact = item.contact {
let name = [contact.firstName, contact.lastName].filter { !$0.isEmpty }.joined(separator: " ")
html += GGChatExportHTML.mediaCard(cssClass: "media_contact", title: name.isEmpty ? GGStrings.ChatExport.Output.contact : name, description: contact.phone, status: nil, link: nil)
}
if let location = item.location {
let link = String(format: "https://maps.apple.com/?ll=%.6f,%.6f", location.latitude, location.longitude)
html += GGChatExportHTML.mediaCard(cssClass: "media_location", title: location.title ?? GGStrings.ChatExport.Output.location, description: String(format: "%.6f, %.6f", location.latitude, location.longitude), status: nil, link: link)
}
if let poll = item.poll {
html += "
\n"
}
if !item.text.isEmpty {
html += "
\(GGChatExportText.html(text: item.text, entities: item.entities))
\n"
}
html += "