diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-11 01:04:46 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-11 01:04:46 -0500 |
commit | 5b6142872511c3846b3655fdee5b224d06b3e280 (patch) | |
tree | 03577a3ee56df77cff3e8dee281b196bde8dc95b /mailnews/base/src/nsMsgDBView.cpp | |
parent | 3890d6e709f64c974e398e58a0ba012c890e7cc5 (diff) | |
download | uxp-5b6142872511c3846b3655fdee5b224d06b3e280.tar.gz |
Bug 1423487 - Support multiple authors in RSS feeds.
Tag mcp-graveyard/UXP#1273
Diffstat (limited to 'mailnews/base/src/nsMsgDBView.cpp')
-rw-r--r-- | mailnews/base/src/nsMsgDBView.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mailnews/base/src/nsMsgDBView.cpp b/mailnews/base/src/nsMsgDBView.cpp index 76a843df72..a1867244ba 100644 --- a/mailnews/base/src/nsMsgDBView.cpp +++ b/mailnews/base/src/nsMsgDBView.cpp @@ -400,10 +400,12 @@ nsresult nsMsgDBView::FetchAuthor(nsIMsgDBHdr * aHdr, nsAString &aSenderString) nsCString headerCharset; aHdr->GetEffectiveCharset(headerCharset); - nsCString emailAddress; nsString name; - ExtractFirstAddress(EncodedHeader(author, headerCharset.get()), name, - emailAddress); + nsCString emailAddress; + nsCOMArray<msgIAddressObject> addresses = EncodedHeader(author, headerCharset.get()); + bool multipleAuthors = addresses.Length() > 1; + + ExtractFirstAddress(addresses, name, emailAddress); if (showCondensedAddresses) GetDisplayNameInAddressBook(emailAddress, aSenderString); @@ -429,6 +431,12 @@ nsresult nsMsgDBView::FetchAuthor(nsIMsgDBHdr * aHdr, nsAString &aSenderString) } } + if (multipleAuthors) + { + aSenderString.AppendLiteral(" "); + aSenderString.Append(GetString(u"andOthers")); + } + UpdateCachedName(aHdr, "sender_name", aSenderString); return NS_OK; |