diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/experiments/EndToEndEncryption.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/experiments/EndToEndEncryption.kt index d6dc05b1..1d4d1b45 100644 --- a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/experiments/EndToEndEncryption.kt +++ b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/experiments/EndToEndEncryption.kt @@ -33,6 +33,7 @@ import me.rhunk.snapenhance.core.util.EvictingMap import me.rhunk.snapenhance.core.util.ktx.getObjectField import me.rhunk.snapenhance.core.wrapper.impl.MessageContent import me.rhunk.snapenhance.core.wrapper.impl.SnapUUID +import me.rhunk.snapenhance.nativelib.NativeLib import java.security.MessageDigest import kotlin.random.Random @@ -393,6 +394,12 @@ class EndToEndEncryption : MessagingRuleFeature( return@subscribe } + if (!NativeLib.initialized) { + context.longToast("Failed to send! Please enable Native Hooks in the settings.") + event.canceled = true + return@subscribe + } + event.addInvokeLater { if (messageContent.contentType == ContentType.SNAP) { messageContent.contentType = ContentType.EXTERNAL_MEDIA