[Xfce4-commits] <postler:master> Recognize X-Notification-ID as project message

Christian Dywan noreply at xfce.org
Mon Jul 11 23:14:06 CEST 2011


Updating branch refs/heads/master
         to 2a3f1090e3a522f006d7ec19788dcd9898138a29 (commit)
       from b8a415720f67c6c3edf20fbfad9c33c9d84cf101 (commit)

commit 2a3f1090e3a522f006d7ec19788dcd9898138a29
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Jul 11 22:29:29 2011 +0200

    Recognize X-Notification-ID as project message

 postler/postler-message.vala |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/postler/postler-message.vala b/postler/postler-message.vala
index 82ce5c4..1cd7b55 100644
--- a/postler/postler-message.vala
+++ b/postler/postler-message.vala
@@ -365,6 +365,8 @@ namespace Postler {
                     if (field == "x-launchpad-bug")
                         can_reply_personally = false;
                 }
+                else if (field == "x-notification-id")
+                    fields.insert (field, parts[1]);
                 else if (field == "list-id") {
                     string field_charset = null;
                     list = parse_encoded (parts[1], out field_charset);
@@ -387,6 +389,16 @@ namespace Postler {
 
             recipients = parse_encoded (recipients, out charset);
 
+            /* For X-Notification-ID the sender or domain is the product name */
+            if (project == null && get_field ("x-notification-id") != null) {
+                string address = Postler.Contact.address_from_string (sender);
+                string? domain = address.rstr ("@");
+                if (domain != null)
+                    project = domain.next_char ();
+                else
+                    project = address;
+            }
+
             /* Some mailing list systems override Reply-To so that it doesn't
                point to the author but the list.
                Also Reply-To may equal From, which is at best confusing. */



More information about the Xfce4-commits mailing list