File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
app/src/main/java/org/thoughtcrime/securesms/backup/v2/exporters Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -480,7 +480,11 @@ private fun BackupMessageRecord.toRemoteProfileChangeUpdate(): ChatUpdateMessage
480480 ? : Base64 .decodeOrNull(this .body)?.let { ProfileChangeDetails .ADAPTER .decode(it) }
481481
482482 return if (profileChangeDetails?.profileNameChange != null ) {
483- ChatUpdateMessage (profileChange = ProfileChangeChatUpdate (previousName = profileChangeDetails.profileNameChange.previous, newName = profileChangeDetails.profileNameChange.newValue))
483+ if (profileChangeDetails.profileNameChange.previous.isNotEmpty() && profileChangeDetails.profileNameChange.newValue.isNotEmpty()) {
484+ ChatUpdateMessage (profileChange = ProfileChangeChatUpdate (previousName = profileChangeDetails.profileNameChange.previous, newName = profileChangeDetails.profileNameChange.newValue))
485+ } else {
486+ null
487+ }
484488 } else if (profileChangeDetails?.learnedProfileName != null ) {
485489 ChatUpdateMessage (learnedProfileChange = LearnedProfileChatUpdate (e164 = profileChangeDetails.learnedProfileName.e164?.e164ToLong(), username = profileChangeDetails.learnedProfileName.username))
486490 } else {
You can’t perform that action at this time.
0 commit comments