From adf2eff024dc0ba5e2bdaa847b52f16250aeb8f4 Mon Sep 17 00:00:00 2001 From: rhunk <101876869+rhunk@users.noreply.github.com> Date: Wed, 22 May 2024 21:21:57 +0200 Subject: [PATCH] fix(message_indicators): fidelius encryption --- .../snapenhance/core/features/impl/ui/MessageIndicators.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/ui/MessageIndicators.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/ui/MessageIndicators.kt index e595ed62..c813c055 100644 --- a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/ui/MessageIndicators.kt +++ b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/ui/MessageIndicators.kt @@ -52,7 +52,7 @@ class MessageIndicators : Feature("Message Indicators", loadParams = FeatureLoad if (message.contentType != ContentType.SNAP.id && message.contentType != ContentType.EXTERNAL_MEDIA.id) return@chatMessage val reader = ProtoReader(message.messageContent ?: return@chatMessage) - val hasEncryption = if (reader.containsPath(4, 3)) reader.getByteArray(4, 3, 3) != null else false + val hasEncryption = reader.containsPath(3, 99, 3) val sentFromIosDevice = if (reader.containsPath(4, 4, 3)) !reader.containsPath(4, 4, 3, 3, 17) else reader.getVarInt(4, 4, 11, 17, 7) != null val sentFromWebApp = reader.getVarInt(4, 4, *(if (reader.containsPath(4, 4, 3)) intArrayOf(3, 3, 22, 1) else intArrayOf(11, 22, 1))) == 7L val sentWithLocation = reader.getVarInt(4, 4, 11, 17, 5) != null