|
|
@ -185,9 +185,10 @@ fun MessageReceiver.handleVisibleMessage(message: VisibleMessage, proto: SignalS
|
|
|
|
if (name.isNotEmpty()) {
|
|
|
|
if (name.isNotEmpty()) {
|
|
|
|
profileManager.setName(context, recipient, name)
|
|
|
|
profileManager.setName(context, recipient, name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (profile.profileKey?.isNotEmpty() == true && profile.profilePictureURL?.isNotEmpty() == true
|
|
|
|
val newProfileKey = profile.profileKey
|
|
|
|
&& (recipient.profileKey == null || !MessageDigest.isEqual(recipient.profileKey, profile.profileKey))) {
|
|
|
|
if (newProfileKey?.isNotEmpty() == true && (newProfileKey.size == 16 || newProfileKey.size == 32) && profile.profilePictureURL?.isNotEmpty() == true
|
|
|
|
profileManager.setProfileKey(context, recipient, profile.profileKey!!)
|
|
|
|
&& (recipient.profileKey == null || !MessageDigest.isEqual(recipient.profileKey, newProfileKey))) {
|
|
|
|
|
|
|
|
profileManager.setProfileKey(context, recipient, newProfileKey)
|
|
|
|
profileManager.setUnidentifiedAccessMode(context, recipient, Recipient.UnidentifiedAccessMode.UNKNOWN)
|
|
|
|
profileManager.setUnidentifiedAccessMode(context, recipient, Recipient.UnidentifiedAccessMode.UNKNOWN)
|
|
|
|
profileManager.setProfilePictureURL(context, recipient, profile.profilePictureURL!!)
|
|
|
|
profileManager.setProfilePictureURL(context, recipient, profile.profilePictureURL!!)
|
|
|
|
}
|
|
|
|
}
|
|
|
|