Closed Bug 1631011 Opened 5 years ago Closed 5 years ago

2 addons using compose.onBeforeSend will not both work

Categories

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

defect
Not set
normal

Tracking

(thunderbird76 fixed)

RESOLVED FIXED
Thunderbird 77.0
Tracking Status
thunderbird76 --- fixed

People

(Reporter: dave, Assigned: darktrojan)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

If two addons use compose.onBeforeSend then the first one to respond with {"cancel":false} will send the email. The response from the second one appears to be ignored.

The test I did to demonstrate this is described here:
https://thunderbird.topicbox.com/groups/addons/T8a984c3fb306a535

Addons such as my Limit non-BCC recipients, which may require interaction, are likely not to work if another addon does something quick, such as add a recipient.

Resetting severity to default of --.

Thanks for filing a bug I was already working on! Save me doing it :-)

Assignee: nobody → geoff
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

We have to fire each listener in sequence. I knew that but clearly I'd forgotten about it somewhere along the line.

Attachment #9141926 - Flags: review?(mkmelin+mozilla)
Attachment #9141926 - Flags: approval-comm-beta?
Comment on attachment 9141926 [details] [diff] [review] 1631011-onbeforesend-sequential-1.diff Review of attachment 9141926 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, r=mkmelin
Attachment #9141926 - Flags: review?(mkmelin+mozilla) → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/bf38a1ba950e
Fire compose.onBeforeSend sequentially instead of all at once. r=mkmelin DONTBUILD

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 77.0
Comment on attachment 9141926 [details] [diff] [review] 1631011-onbeforesend-sequential-1.diff approved for beta
Attachment #9141926 - Flags: approval-comm-beta? → approval-comm-beta+

In order to get this patch to apply to comm-beta I also had to take Bug 1619057 as the changes overlap. Bug 1629023 might be needed as well.

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

Attachment

General

Created:
Updated:
Size: