Commit 2044acbf authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Contacts: include schema in email rel

parent 4f226717
......@@ -693,7 +693,8 @@ QByteArray contactToXML(const ContactPtr& contact)
const auto preferredEmail = contact->preferredEmail();
Q_FOREACH(const auto &email, contact->emailList()) {
const auto rels = email.parameters().value(QStringLiteral("TYPE"), { QStringLiteral("http://schemas.google.com/g/2005#home") });
auto rel = rels.isEmpty() ? "http://schemas.google.com/g/2005#home" : rels.at(0).toLower().toUtf8();
auto rel = rels.isEmpty() ? QByteArray("http://schemas.google.com/g/2005#home") :
"http://schemas.google.com/g/2005#" + rels.at(0).toLower().toUtf8();
output.append("<gd:email rel='" + rel + "' address='").append(email.mail().toHtmlEscaped().toUtf8()).append("'");
if (email.mail() == preferredEmail) {
output.append(" primary=\"true\"");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment