Closed Bug 1617448 Opened 5 months ago Closed 4 months ago

browser.compose.beginNew needs a way of specifying the identity to use

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 76.0

People

(Reporter: standard8, Assigned: darktrojan)

References

Details

Attachments

(2 files)

In Conversations we offer a button that allows starting an email directly to a contact from within the message header.

If I use browser.compose.beginNew, then I have no option to specify that it should use a particular account / identity / email address to use.

This means that any time a user opens a compose window with this method, they'll be defaulted to the default identity, even though they're on a different account.

This probably depends on some of the work in bug 1531593.

This just renames a variable because it's confusing.

Assignee: nobody → geoff
Status: NEW → ASSIGNED
Attachment #9137047 - Flags: review?(mkmelin+mozilla)

This is the actual change.

Attachment #9137048 - Flags: review?(mkmelin+mozilla)
Attachment #9137047 - Flags: review?(mkmelin+mozilla) → review+
Comment on attachment 9137048 [details] [diff] [review]
1617448-part2-compose-identities-1.diff

Review of attachment 9137048 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/components/extensions/parent/ext-compose.js
@@ +173,5 @@
>      plainTextBody: editor.outputToString("text/plain", 0),
>    };
> +  if (extension.hasPermission("accountsRead")) {
> +    details.identityId = composeWindow.getCurrentIdentityKey();
> +  }

Maybe permission checks should be on top?
Attachment #9137048 - Flags: review?(mkmelin+mozilla) → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/b2b96ec63aff
Rename composeParams variable to details to avoid confusion. r=mkmelin
https://hg.mozilla.org/comm-central/rev/83b898e3dfb2
Allow the compose APIs to work with identities. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 76.0
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/ccfc0f0d776c
follow-up - Remove some incorrect text from the compose API documentation. rs=docs-only DONTBUILD
You need to log in before you can comment on or make changes to this bug.