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 | 0707a51eaddec22ab760e27050e2fcefab2cdae5 (patch) | |
tree | 03577a3ee56df77cff3e8dee281b196bde8dc95b /mailnews/base | |
parent | 0903ef35611c8d2a966f057d2e74437a73de71df (diff) | |
download | UXP-0707a51eaddec22ab760e27050e2fcefab2cdae5.tar UXP-0707a51eaddec22ab760e27050e2fcefab2cdae5.tar.gz UXP-0707a51eaddec22ab760e27050e2fcefab2cdae5.tar.lz UXP-0707a51eaddec22ab760e27050e2fcefab2cdae5.tar.xz UXP-0707a51eaddec22ab760e27050e2fcefab2cdae5.zip |
Bug 1423487 - Support multiple authors in RSS feeds.
Tag #1273
Diffstat (limited to 'mailnews/base')
-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 76a843df7..a1867244b 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; |