mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-06 20:21:56 +00:00
fix: update prof pic and name and use new profile instead of existing recipient
This commit is contained in:
@@ -158,9 +158,10 @@ fun MessageReceiver.handleVisibleMessage(message: VisibleMessage, proto: SignalS
|
|||||||
if (userPublicKey == message.sender && displayName.isNotEmpty()) {
|
if (userPublicKey == message.sender && displayName.isNotEmpty()) {
|
||||||
// Update the user's local name if the message came from their master device
|
// Update the user's local name if the message came from their master device
|
||||||
TextSecurePreferences.setProfileName(context, displayName)
|
TextSecurePreferences.setProfileName(context, displayName)
|
||||||
|
} else if (displayName.isNotEmpty()) {
|
||||||
|
profileManager.setDisplayName(context, recipient, displayName)
|
||||||
}
|
}
|
||||||
profileManager.setDisplayName(context, recipient, displayName)
|
if (newProfile.profileKey?.isNotEmpty() == true && !MessageDigest.isEqual(recipient.profileKey, newProfile.profileKey)) {
|
||||||
if (recipient.profileKey?.isNotEmpty() == true && !MessageDigest.isEqual(recipient.profileKey, newProfile.profileKey)) {
|
|
||||||
profileManager.setProfileKey(context, recipient, newProfile.profileKey!!)
|
profileManager.setProfileKey(context, recipient, newProfile.profileKey!!)
|
||||||
profileManager.setUnidentifiedAccessMode(context, recipient, Recipient.UnidentifiedAccessMode.UNKNOWN)
|
profileManager.setUnidentifiedAccessMode(context, recipient, Recipient.UnidentifiedAccessMode.UNKNOWN)
|
||||||
val newUrl = newProfile.profilePictureURL
|
val newUrl = newProfile.profilePictureURL
|
||||||
|
|||||||
Reference in New Issue
Block a user