You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/09/12 19:38:25 UTC

[whimsy] branch master updated: add reply info

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  31d5eb6   add reply info
31d5eb6 is described below

commit 31d5eb66b7dfeb67409fb4da6e96ee6e8db729a4
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon Sep 12 15:38:12 2016 -0400

    add reply info
---
 www/secmail/models/message.rb          | 4 ++++
 www/secmail/views/actions/icla.json.rb | 9 +++++++++
 2 files changed, 13 insertions(+)

diff --git a/www/secmail/models/message.rb b/www/secmail/models/message.rb
index 6f0823e..05ee5b2 100644
--- a/www/secmail/models/message.rb
+++ b/www/secmail/models/message.rb
@@ -52,6 +52,10 @@ class Message
     @email
   end
 
+  def id
+    @headers['Message-ID']
+  end
+
   def from
     mail[:from]
   end
diff --git a/www/secmail/views/actions/icla.json.rb b/www/secmail/views/actions/icla.json.rb
index be2446d..c61b5eb 100644
--- a/www/secmail/views/actions/icla.json.rb
+++ b/www/secmail/views/actions/icla.json.rb
@@ -87,6 +87,15 @@ _task "email #@email" do
   mail.cc = (mail.cc + message.cc).uniq if message.cc
   mail.bcc = message.bcc - mail.cc if message.bcc
 
+  # add reply info
+  mail.in_reply_to = message.id
+  mail.references = message.id
+  if message.subject =~ /^re:\s/i
+    mail.subject = message.subject
+  else
+    mail.subject = 'Re: ' + message.subject
+  end
+
   # echo email
   _message mail.to_s
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].