Skip to content

Linux + iPhone Continuity / iMessage / SMS

simplify

Zack Bartel05b6462225e5
diff --git a/extension/host/tether-native-host b/extension/host/tether-native-host
index 5bbd038..47f3b56 100755
--- a/extension/host/tether-native-host
+++ b/extension/host/tether-native-host
@@ -2,4 +2,4 @@
# Wrapper script to run tether in native messaging proxy mode
# The browser will execute this script via the com.tether.extension.json manifest.
-exec /usr/local/bin/tether --native-host
+exec tether --native-host
diff --git a/extension/src/mail/extractor.js b/extension/src/mail/extractor.js
index 87f777e..5e3efc8 100644
--- a/extension/src/mail/extractor.js
+++ b/extension/src/mail/extractor.js
@@ -4,6 +4,8 @@
// This example assumes Manifest V2/V3 background script using the WebExtension Mail APIs
// (messenger.messages, messenger.mailTabs)
+import { sendToNativeHost } from '../shared/native.js';
+
if (typeof messenger !== 'undefined') {
console.log("Tether Mail Extractor loaded in Thunderbird/Betterbird");
@@ -35,9 +37,9 @@ if (typeof messenger !== 'undefined') {
const otp = matches[0]; // Simplistic approach: take the first one
console.log("Found OTP in email:", otp);
- // Send it to the background script, which forwards it to the native daemon
- browser.runtime.sendMessage({
- action: "found_otp_in_email",
+ // Send it directly to the native daemon
+ sendToNativeHost({
+ command: "new_otp",
otp: otp,
source: message.subject
});