Navigation Menu

Skip to content

Commit

Permalink
Merge branch 'jb51831-google-fullname' into 'master'
Browse files Browse the repository at this point in the history
[buteo-sync-plugins-social] Don't set Google gd:fullName as customLabel field. Fixes JB#51831

See merge request mer-core/buteo-sync-plugins-social!76
  • Loading branch information
blam committed Nov 4, 2020
2 parents 78f2a3b + c1239f2 commit 356f1b4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/google/google-contacts/googlecontactstream.cpp
Expand Up @@ -661,8 +661,6 @@ QContactDetail GoogleContactStream::handleEntryName()
name.setPrefix(mXmlReader->readElementText());
} else if (mXmlReader->qualifiedName() == "gd:nameSuffix") {
name.setSuffix(mXmlReader->readElementText());
} else if (mXmlReader->qualifiedName() == "gd:fullName") {
name.setCustomLabel(mXmlReader->readElementText());
}
}
mXmlReader->readNextStartElement();
Expand Down Expand Up @@ -1008,6 +1006,8 @@ void GoogleContactStream::encodeName(const QContactName &name)
if (!name.suffix().isEmpty())
mXmlWriter->writeTextElement("gd:nameSuffix", name.suffix());

// Send the formatted fullName to the server. Otherwise if this field is missing, the server
// detects it as a spurious modification.
const QString fullName = (QStringList()
<< name.prefix()
<< SeasideCache::primaryName(firstName, lastName)
Expand All @@ -1016,8 +1016,6 @@ void GoogleContactStream::encodeName(const QContactName &name)
<< name.suffix()).join(' ');
if (!fullName.isEmpty())
mXmlWriter->writeTextElement("gd:fullName", fullName);
else if (!name.customLabel().isEmpty())
mXmlWriter->writeTextElement("gd:fullName", name.customLabel());

mXmlWriter->writeEndElement();
}
Expand Down

0 comments on commit 356f1b4

Please sign in to comment.