Closed
Bug 1240823
Opened 9 years ago
Closed 9 years ago
Add observer to compose to allow extensions to manipulate outgoing server
Categories
(MailNews Core :: Composition, defect)
MailNews Core
Composition
Tracking
(thunderbird44 wontfix, thunderbird45 fixed, thunderbird46 fixed)
RESOLVED
FIXED
Thunderbird 46.0
People
(Reporter: rkent, Assigned: rkent)
References
Details
Attachments
(1 file)
6.40 KB,
patch
|
mkmelin
:
review+
rkent
:
approval-comm-aurora+
|
Details | Diff | Splinter Review |
This is a followup to bug 1240327, fixing the observer notification since accountKey is unreliable (bug 449482 comment 16).
Assignee | ||
Comment 1•9 years ago
|
||
Assignee: nobody → rkent
Status: NEW → ASSIGNED
Attachment #8709637 -
Flags: review?(mkmelin+mozilla)
Comment 2•9 years ago
|
||
Comment on attachment 8709637 [details] [diff] [review]
Add an observer and test
Review of attachment 8709637 [details] [diff] [review]:
-----------------------------------------------------------------
::: mailnews/compose/src/nsMsgCompose.cpp
@@ +1079,5 @@
> +
> + // Allow extensions to specify an outgoing server.
> + nsCOMPtr<nsIObserverService> observerService =
> + mozilla::services::GetObserverService();
> + if (observerService)
shouldn't !observerService just error out?
@@ +1085,5 @@
> + // Assemble a string with sending parameters.
> + nsAutoString sendParms;
> +
> + // First parameter: account key. This is not reliable, see
> + // bug 449482 comment 16.
per comment 22 that should not be the case anymore though
@@ +1086,5 @@
> + nsAutoString sendParms;
> +
> + // First parameter: account key. This is not reliable, see
> + // bug 449482 comment 16.
> + sendParms.AppendASCII(accountKey && *accountKey ? accountKey : "none");
should this really be "none"? not just ""?
::: mailnews/compose/test/unit/test_sendObserver.js
@@ +32,5 @@
> + fields.cc = "Alex <alex@tinderbox.invalid>";
> + fields.subject = "Let's test the observer";
> +
> + yield richCreateMessage(fields, [], identity);
> + // observer data should have:
nit: trailing space here and a few lines down
Attachment #8709637 -
Flags: review?(mkmelin+mozilla) → review+
Assignee | ||
Comment 3•9 years ago
|
||
https://hg.mozilla.org/comm-central/rev/fa1e66e01549
One comment on review:
"per comment 22 that should not be the case anymore though"
Yes, but there are other places in the code where SendMsg is called with a null account, so I changed the message to a simple warning that the account might be null.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox46:
affected → ---
status-thunderbird44:
--- → wontfix
status-thunderbird45:
--- → affected
status-thunderbird46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 46.0
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8709637 [details] [diff] [review]
Add an observer and test
[Triage Comment] This is a feature, giving a hook for extensions, that should be in TB 45. It should not have any effect on existing usage. Please land after an initial successful comm-central build and tests. (Land from the hg rev, not this actual patch).
Attachment #8709637 -
Flags: approval-comm-aurora+
Comment 5•9 years ago
|
||
Aurora:
https://hg.mozilla.org/releases/comm-aurora/rev/d667a01136d0
Of course landed via "hg transplant"!
You need to log in
before you can comment on or make changes to this bug.
Description
•