Skip to content

Commit

Permalink
Don't fail when exporting an identity without a sender name
Browse files Browse the repository at this point in the history
  • Loading branch information
cketti committed Apr 24, 2023
1 parent af28c75 commit 9e7ee72
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,11 @@ class SettingsExporter(

// Write name belonging to the identity
val name = prefs[prefix + IDENTITY_NAME_KEY + suffix] as String?
serializer.startTag(null, NAME_ELEMENT)
serializer.text(name)
serializer.endTag(null, NAME_ELEMENT)
if (name != null) {
serializer.startTag(null, NAME_ELEMENT)
serializer.text(name)
serializer.endTag(null, NAME_ELEMENT)
}

// Write email address belonging to the identity
val email = prefs[prefix + IDENTITY_EMAIL_KEY + suffix] as String?
Expand Down

0 comments on commit 9e7ee72

Please sign in to comment.