diff --git a/extension/js/common/browser/browser-msg.ts b/extension/js/common/browser/browser-msg.ts index cdf867c2e96..1c87942e5b8 100644 --- a/extension/js/common/browser/browser-msg.ts +++ b/extension/js/common/browser/browser-msg.ts @@ -118,7 +118,6 @@ export namespace Bm { export type ExpirationCacheDeleteExpired = Promise; export type ThunderbirdGetDownloadableAttachment = ThunderbirdAttachment[]; export type ThunderbirdGetCurrentUser = string | undefined; - export type ThunderbirdMsgGet = { attachments: messenger.messages.MessageAttachment[]; messagePart: messenger.messages.MessagePart }; export type ThunderbirdOpenPassphraseDialog = Promise; export type ThunderbirdInitiateAttachmentDownload = Promise; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -138,8 +137,7 @@ export namespace Bm { | ExpirationCacheDeleteExpired | AjaxGmailAttachmentGetChunk | ConfirmationResult - | ThunderbirdGetDownloadableAttachment - | ThunderbirdMsgGet; + | ThunderbirdGetDownloadableAttachment; } export type AnyRequest = @@ -251,7 +249,6 @@ export class BrowserMsg { BrowserMsg.sendAwait(undefined, 'thunderbirdInitiateAttachmentDownload', bm, true) as Promise, thunderbirdGetCurrentUser: () => BrowserMsg.sendAwait(undefined, 'thunderbirdGetCurrentUser', undefined, true) as Promise, - thunderbirdMsgGet: () => BrowserMsg.sendAwait(undefined, 'thunderbirdMsgGet', undefined, true) as Promise, thunderbirdOpenPassphraseDiaglog: (bm: Bm.ThunderbirdOpenPassphraseDialog) => BrowserMsg.sendAwait(undefined, 'thunderbirdOpenPassphraseDialog', bm, true) as Promise, }, diff --git a/extension/js/service_worker/background.ts b/extension/js/service_worker/background.ts index 34a09c3499b..a8496d5763b 100644 --- a/extension/js/service_worker/background.ts +++ b/extension/js/service_worker/background.ts @@ -74,7 +74,6 @@ console.info('background.js service worker starting'); BgHandlers.thunderbirdSecureComposeHandler(); await BgHandlers.thunderbirdContentScriptRegistration(); BrowserMsg.bgAddListener('thunderbirdGetCurrentUser', BgHandlers.thunderbirdGetCurrentUserHandler); - BrowserMsg.bgAddListener('thunderbirdMsgGet', BgHandlers.thunderbirdMsgGetHandler); BrowserMsg.bgAddListener('thunderbirdGetDownloadableAttachment', BgHandlers.thunderbirdGetDownloadableAttachment); BrowserMsg.bgAddListener('thunderbirdInitiateAttachmentDownload', BgHandlers.thunderbirdInitiateAttachmentDownload); BrowserMsg.bgAddListener('thunderbirdOpenPassphraseDialog', BgHandlers.thunderbirdOpenPassphraseDialog); diff --git a/extension/js/service_worker/bg-handlers.ts b/extension/js/service_worker/bg-handlers.ts index ac0d65ad563..a185d06b703 100644 --- a/extension/js/service_worker/bg-handlers.ts +++ b/extension/js/service_worker/bg-handlers.ts @@ -218,19 +218,6 @@ export class BgHandlers { return; }; - public static thunderbirdMsgGetHandler = async (): Promise => { - const [tab] = await messenger.tabs.query({ active: true, currentWindow: true }); - if (tab.id) { - const message = await messenger.messageDisplay.getDisplayedMessage(tab.id); - if (message?.id) { - const attachments = await messenger.messages.listAttachments(message.id); - const messagePart = await messenger.messages.getFull(message.id); - return { attachments, messagePart }; - } - } - return { attachments: [], messagePart: {} as messenger.messages.MessagePart }; - }; - public static thunderbirdOpenPassphraseDialog = async (r: Bm.ThunderbirdOpenPassphraseDialog): Promise => { await BgUtils.openExtensionTab(`chrome/elements/passphrase.htm?type=message&parentTabId=0&acctEmail=${r.acctEmail}&longids=${r.longids}`, true); };