diff --git a/src/org/thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt b/src/org/thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt index 7e803c48b9..4486d76795 100644 --- a/src/org/thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt +++ b/src/org/thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt @@ -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 diff --git a/src/org/thoughtcrime/securesms/loki/protocol/SessionMetaProtocol.kt b/src/org/thoughtcrime/securesms/loki/protocol/SessionMetaProtocol.kt index a66aed95a3..2276539323 100644 --- a/src/org/thoughtcrime/securesms/loki/protocol/SessionMetaProtocol.kt +++ b/src/org/thoughtcrime/securesms/loki/protocol/SessionMetaProtocol.kt @@ -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())) {