[Xfce4-commits] <postler:master> Render invalid recipients as Undisclosed Recipients

Christian Dywan noreply at xfce.org
Thu Jul 7 19:58:02 CEST 2011


Updating branch refs/heads/master
         to 6c5c194762729c9e4807a3f73c371f2e2c431338 (commit)
       from 792368897cb8608f1a0f08bf16685c0bfe569cf9 (commit)

commit 6c5c194762729c9e4807a3f73c371f2e2c431338
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Jul 7 18:52:15 2011 +0200

    Render invalid recipients as Undisclosed Recipients

 postler/postler-content.vala |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index a984007..931beca 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -853,6 +853,12 @@ public class Postler.Content : WebKit.WebView {
                 message = thread.nth_data (0);
             last_location = message.get_path ();
             subject = message.subject;
+            /* If there's no real address, it's probably undisclosed-recipients:; */
+            string recipients;
+            if (message.recipients.chr (-1, '@') != null)
+                recipients = linkify_address (reply_uri (message, "Re: ", message.recipients));
+            else
+                recipients = _("Undisclosed recipients");
             list_post = message.get_field ("list-post");
             if (list_post != null)
                 list_post = Postler.Contact.address_from_string (list_post);
@@ -891,7 +897,7 @@ public class Postler.Content : WebKit.WebView {
                              color_to_rgb (style.fg[widget_state])),
                          content_stylesheet,
                          message.subject,
-                         linkify_address (reply_uri (message, "Re: ", message.recipients)),
+                         recipients,
                          format_header (_("Mailing List:"), list_unsubscribe),
                          body_markup),
                 "text/html", "UTF-8", "file://" + template_path);



More information about the Xfce4-commits mailing list