Closed Bug 1901822 Opened 2 years ago Closed 2 years ago

Find a way to provide MailUtils.handleNewsUri() for the "open by messageId" add-on

Categories

(Thunderbird :: Add-Ons: Extensions API, task)

task

Tracking

(thunderbird_esr115 wontfix, thunderbird_esr128 wontfix)

RESOLVED FIXED
129 Branch
Tracking Status
thunderbird_esr115 --- wontfix
thunderbird_esr128 --- wontfix

People

(Reporter: john, Assigned: welpy-cw)

Details

Attachments

(2 files, 1 obsolete file)

Summary: Find a way to provide MailUtils.handleNewsUri() for the "open by messageId" add-ons → Find a way to provide MailUtils.handleNewsUri() for the "open by messageId" add-on

I am not trying to dispute that it may be convenient to have an API method providing behavior similar to click on a link. On the other hand the "open by Message-Id" example is not convincing. The add-on may have single context menu entry and render link variants in an action popup. Advantages:

  • If the Message-Id is found in several folders then the user may select which one should be opened,
  • It is apparent if the Message-Id belongs to some available message,
  • The user may select NNTP servers among configured ones,
  • The user may select web archive for the current Mesasge-ID.

Thank you for your suggestions. Please continue here.

The scope of the API addition is to search on the server, if I understood the add-on feature correctly.

I am thinking about making this possible through messages.query() by adding an "online" flag, or something like that. Would be neat if that would also work for IMAP.

(In reply to John Bieling (:TbSync) from comment #3)

The scope of the API addition is to search on the server, if I understood the add-on feature correctly.

I am thinking about making this possible through messages.query() by adding an "online" flag, or something like that. Would be neat if that would also work for IMAP.

To display a message specified by some URI, extension code does not need to search it first. message.query() is another feature and it may be useful as well.

There are 2 ways to display a message:

  • In a new tab or window depending on mail.openMessageBehavior value as it is implemented for click on a link in a message body. I am unaware of API that allows extensions to get similar behavior. A workaround is to present a link to the user.
  • In the same window as it is implemented for "References" Message-Id links (but not for mid: links, see Bug #1785790). In some cases it is more convenient than a new tab or a window. However a message may be from some news group the user is not subscribed to. I am in doubts if it is a good idea to display a message outside of subscriptions in a 3 pane window.

What feature is actually requested: lookup on the server or just display a message?

The feature this bug is about is the part of MailUtils.handleNewsUri() which searches a message on the server and downloads it as a file (without adding it to the local database or a mail folder).

The add-on can then do different things with that external message: display it, attach it to a message or add it to a local mail folder, or...

Attachment #9407554 - Attachment description: WIP: Bug 1901822 - Extend the messages API with a function to download a message from a news server. r=john.bieling → Bug 1901822 - Extend the messages API with a function to download a message from a news server. r=john.bieling
Assignee: nobody → h.w.forms
Status: NEW → ASSIGNED

This makes it possible to search for the specified headerMessageId directly on the server(s) of all or the specified NNTP account(s) when the new online property is set.

Attachment #9407554 - Attachment is obsolete: true

Add-on for testing purposes.

Target Milestone: --- → 129 Branch

Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/62b0b1c6a84b
Enable the query function of the messages API to search online. r=john.bieling

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Unfortunately this is a WONTFIX for 128 ESR, see John's comment in Phab.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: