mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-06-12 05:07:46 +02:00
feat(core/e2ee): native hooks warning
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user