Closed
Bug 684865
Opened 13 years ago
Closed 13 years ago
When receiving a new email, the notification doesn't display the email address of the sender when he has no name
Categories
(Thunderbird :: Mail Window Front End, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 15.0
People
(Reporter: LpSolit, Assigned: hiro)
References
()
Details
Attachments
(1 file, 3 obsolete files)
2.70 KB,
patch
|
hiro
:
review+
|
Details | Diff | Splinter Review |
Some users didn't set their real name when sending an email, so only their email address is displayed in the From: field, i.e.
foo@bar.com
instead of
Mr Foo <foo@bar.com>
When such emails arrive in the inbox, the notification which popup doesn't mention who sent the email. All we see is "... from " at the end of the message. If no name is set, then it should fallback to "... from foo@bar.com" so that we can at a glance see who sent the email and decide if it should be read immediately or can wait a bit while doing some other work.
Reporter | ||
Comment 1•13 years ago
|
||
Note to self: newMailNotification_messagetitle is located in chrome/en-US/locale/en-US/messenger/messenger.properties and is called by nsMessengerUnixIntegration::BuildNotificationBody() in mailnews/base/src/nsMessengerUnixIntegration.cpp line 347 only.
Assignee | ||
Comment 2•13 years ago
|
||
msg_parse_Header_addresses returns 0-length string, so we should also check the string.
Comment 3•13 years ago
|
||
Comment on attachment 603152 [details] [diff] [review]
Fix
I'm not quite sure I see why this is happening. test_nsIMsgHeaderParser2.js already has at least one test for this and we use the function in lots of places.
Can you try to extend the test_nsIMsgHeaderParser2.js test to show this case please?
Assignee | ||
Comment 4•13 years ago
|
||
I do not prefer that a test checks several things (in this case this bug and others) because it's difficult to find cause if regression happens.
Attachment #603152 -
Attachment is obsolete: true
Attachment #603152 -
Flags: review?(mbanner)
Attachment #609667 -
Flags: review?(mbanner)
Comment 5•13 years ago
|
||
If the thing to test is very related, keeping it in a separate file isn't nice imho. E.g. it makes it very difficult to find when creating related tests. (And at the very least, the file name of the test should be descriptive.)
Assignee | ||
Comment 6•13 years ago
|
||
(In reply to Magnus Melin from comment #5)
> If the thing to test is very related, keeping it in a separate file isn't
> nice imho. E.g. it makes it very difficult to find when creating related
> tests. (And at the very least, the file name of the test should be
> descriptive.)
I do not think it is difficult to create related tests. But I agree your comment in parentheses. Bug number file name is too bad. That was my neglect. Can you suggest better name for this test please?
Comment 7•13 years ago
|
||
test_nsIMsgHeaderParser-parseHeadersWithArray.js? BTW, the test file doesn't have a licence block (MPL2 or such).
Comment 8•13 years ago
|
||
Just to follow up on the separate test file - I'm happy with that, in theory it could be said the parseHeadersWithArray check shouldn't actually be in test_nsIMsgHeaderParser2.js, as it isn't quite related to the tests in the rest of the file.
Comment 9•13 years ago
|
||
Comment on attachment 609667 [details] [diff] [review]
Fix with a new test
>diff --git a/mailnews/mime/test/unit/test_bug684865.js b/mailnews/mime/test/unit/test_bug684865.js
Please name this file test_parseHeadersWithArray.js and update the xpcshell.ini to match. r=me with that fixed.
Attachment #609667 -
Flags: review?(mbanner) → review+
Comment 10•13 years ago
|
||
Hiro ?
Assignee | ||
Comment 11•13 years ago
|
||
carrying over review+.
Attachment #609667 -
Attachment is obsolete: true
Attachment #623582 -
Flags: review+
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 12•13 years ago
|
||
Comment on attachment 623582 [details] [diff] [review]
Change the test file name,
Oops! Wrong patch
Attachment #623582 -
Attachment is obsolete: true
Attachment #623582 -
Flags: review+
Assignee | ||
Comment 13•13 years ago
|
||
Attachment #623589 -
Flags: review+
Comment 14•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 15.0
Comment 15•13 years ago
|
||
So an alternative would be to change
author.Assign(names[0] ? names[0] : emails[0]);
to
author.Assign(names[0] && *(names[0]) ? names[0] : emails[0]);
in http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsMessengerUnixIntegration.cpp#337
You need to log in
before you can comment on or make changes to this bug.
Description
•