mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-25 02:17:20 +00:00
fix: update prof pic and name and use new profile instead of existing recipient
This commit is contained in:
parent
572f262b6d
commit
42ca1332ec
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user