SES-2113 - Never display a username that matches that user's id. Truncate instead (#992)

pull/1710/head
ThomasSession 1 month ago committed by GitHub
parent cffa2e1055
commit 9f414aa52c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -46,6 +46,9 @@ class UsernameUtilsImpl(
configFactory.withGroupConfigs(groupId) { it.groupMembers.getOrNull(accountID)?.name }
} else null
return userName ?: truncateIdForDisplay(accountID)
// if the username is actually set to the user's accountId, truncate it
val validatedUsername = if(userName == accountID) truncateIdForDisplay(accountID) else userName
return validatedUsername ?: truncateIdForDisplay(accountID)
}
}

@ -17,8 +17,11 @@
<LinearLayout
android:id="@+id/conversationTitleContainer"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_marginStart="@dimen/medium_spacing"
android:paddingEnd="@dimen/medium_spacing"
android:gravity="center_horizontal|center_vertical"
android:orientation="vertical">

Loading…
Cancel
Save