commit e0d9ec7bee9b3ad354769db514aba0c330223594
parent 43e17de1ad84e9835a0a77a220f1b8d5805f48b8
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date:   Sat,  6 Apr 2024 16:18:45 +0200

fix(core): message indicators

Diffstat:
Mcore/src/main/kotlin/me/rhunk/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 @@ -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, 1) == null else false + val hasEncryption = if (reader.containsPath(4, 3)) reader.getByteArray(4, 3, 3) != null else false 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