summaryrefslogtreecommitdiff
path: root/mailnews/base
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-11 01:04:46 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-11 01:04:46 -0500
commit0707a51eaddec22ab760e27050e2fcefab2cdae5 (patch)
tree03577a3ee56df77cff3e8dee281b196bde8dc95b /mailnews/base
parent0903ef35611c8d2a966f057d2e74437a73de71df (diff)
downloaduxp-0707a51eaddec22ab760e27050e2fcefab2cdae5.tar.gz
Bug 1423487 - Support multiple authors in RSS feeds.
Tag #1273
Diffstat (limited to 'mailnews/base')
-rw-r--r--mailnews/base/src/nsMsgDBView.cpp14
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;