mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-26 01:27:20 +00:00
Add FIXME
This commit is contained in:
parent
132ca11692
commit
f85ad3564b
@ -197,7 +197,7 @@ object MultiDeviceProtocol {
|
|||||||
TextSecurePreferences.setMultiDevice(context, true)
|
TextSecurePreferences.setMultiDevice(context, true)
|
||||||
LokiFileServerAPI.shared.addDeviceLink(deviceLink)
|
LokiFileServerAPI.shared.addDeviceLink(deviceLink)
|
||||||
org.thoughtcrime.securesms.loki.protocol.SessionMetaProtocol.handleProfileUpdateIfNeeded(context, content)
|
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
|
@JvmStatic
|
||||||
|
@ -48,15 +48,11 @@ object SessionMetaProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: Basically a duplicate of PushDecryptJob's handleProfileKey
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun handleProfileKey(context: Context, content: SignalServiceContent) {
|
fun duplicate_handleProfileKey(context: Context, content: SignalServiceContent) {
|
||||||
val message = content.dataMessage.get()
|
val message = content.dataMessage.get()
|
||||||
if (!message.profileKey.isPresent) { return }
|
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 database = DatabaseFactory.getRecipientDatabase(context)
|
||||||
val recipient = Recipient.from(context, Address.fromSerialized(content.sender), false)
|
val recipient = Recipient.from(context, Address.fromSerialized(content.sender), false)
|
||||||
if (recipient.profileKey == null || !MessageDigest.isEqual(recipient.profileKey, message.profileKey.get())) {
|
if (recipient.profileKey == null || !MessageDigest.isEqual(recipient.profileKey, message.profileKey.get())) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user