fix host message

This commit is contained in:
Son NK
2022-11-08 16:51:18 +01:00
parent 5f1412f773
commit ea3c39f2df
2 changed files with 6 additions and 12 deletions
+1 -3
View File
@@ -171,9 +171,7 @@ export default {
try {
console.log("send log out event to host app");
let r = await browser.runtime.sendNativeMessage("application.id", {
message: {
logged_out: {},
},
logged_out: {},
});
} catch (error) {
console.info("can't send data to native app", error);
+5 -9
View File
@@ -266,12 +266,10 @@ export default {
try {
console.log("send api key to host app");
let r = await browser.runtime.sendNativeMessage("application.id", {
message: {
logged_in: {
data: {
api_key: this.apiKey,
api_url: this.apiUrl,
},
logged_in: {
data: {
api_key: this.apiKey,
api_url: this.apiUrl,
},
},
});
@@ -530,9 +528,7 @@ export default {
try {
console.log("send upgrade event to host app");
let r = await browser.runtime.sendNativeMessage("application.id", {
message: {
upgrade: {},
},
upgrade: {},
});
} catch (error) {
console.info("can't send data to native app", error);