mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
Add FIXME
This commit is contained in:
parent
132ca11692
commit
f85ad3564b
@ -197,7 +197,7 @@ object MultiDeviceProtocol {
|
||||
TextSecurePreferences.setMultiDevice(context, true)
|
||||
LokiFileServerAPI.shared.addDeviceLink(deviceLink)
|
||||
org.thoughtcrime.securesms.loki.protocol.SessionMetaProtocol.handleProfileUpdateIfNeeded(context, content)
|
||||
org.thoughtcrime.securesms.loki.protocol.SessionMetaProtocol.handleProfileKey(context, content)
|
||||
org.thoughtcrime.securesms.loki.protocol.SessionMetaProtocol.duplicate_handleProfileKey(context, content)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
|
@ -48,15 +48,11 @@ object SessionMetaProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: Basically a duplicate of PushDecryptJob's handleProfileKey
|
||||
@JvmStatic
|
||||
fun handleProfileKey(context: Context, content: SignalServiceContent) {
|
||||
fun duplicate_handleProfileKey(context: Context, content: SignalServiceContent) {
|
||||
val message = content.dataMessage.get()
|
||||
if (!message.profileKey.isPresent) { return }
|
||||
|
||||
/*
|
||||
If we get a profile key then we don't need to map it to the primary device.
|
||||
For now a profile key is mapped one-to-one to avoid secondary devices setting the incorrect avatar for a primary device.
|
||||
*/
|
||||
val database = DatabaseFactory.getRecipientDatabase(context)
|
||||
val recipient = Recipient.from(context, Address.fromSerialized(content.sender), false)
|
||||
if (recipient.profileKey == null || !MessageDigest.isEqual(recipient.profileKey, message.profileKey.get())) {
|
||||
|
Loading…
Reference in New Issue
Block a user