From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.213.28.69 with SMTP id l5cs522687ebc; Wed, 20 Jan 2010 14:36:55 -0800 (PST) Received: by 10.224.52.72 with SMTP id h8mr417369qag.305.1264027014854; Wed, 20 Jan 2010 14:36:54 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 5si1312264qwg.48.2010.01.20.14.36.54; Wed, 20 Jan 2010 14:36:54 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 0046215B802B; Wed, 20 Jan 2010 17:36:53 -0500 (EST) X-Greylist: delayed 375 seconds by postgrey-1.31 at rubyforge.org; Wed, 20 Jan 2010 17:36:52 EST Received: from twice-irc.de (mx2.twice-irc.de [79.140.35.195]) by rubyforge.org (Postfix) with ESMTP id 882EF18582E0 for ; Wed, 20 Jan 2010 17:36:52 -0500 (EST) Received: from midna.zekjur.net (midna.zekjur.net [IPv6:2001:4d88:1008:4242:21c:c0ff:fe7e:4776]) by twice-irc.de (Postfix) with ESMTPSA id B7BB4166BCF for ; Wed, 20 Jan 2010 23:30:21 +0100 (CET) Received: by midna.zekjur.net (Postfix, from userid 101) id 6A18897A01F; Wed, 20 Jan 2010 23:30:11 +0100 (CET) From: Michael Stapelberg To: sup-devel Date: Wed, 20 Jan 2010 23:30:11 +0100 Message-Id: <1264026370-sup-8092@midna.zekjur.net> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Content-Type: multipart/mixed; boundary="=-1264026611-388570-6488-523-1-=" MIME-Version: 1.0 Subject: [sup-devel] [PATCH] Use multiple body arrays when calling before-edit for each reply type X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org --=-1264026611-388570-6488-523-1-= Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Hi, I created a hook which modified the body of each new message to look like my usual skeleton for mails (greeting, content, signature). I did not use the signature function for that because I wanted to put in the greeting with the correct recipient. Now I wanted to make this even more comfortable for me by checking if the recipient of my mail is speaking english and thus using the english signature instead of the german one. This was possible to a certain degree, but failed when I wanted to see if any of the CC'ed addresses matched a certain pattern. Attached to this mail you can find a patch which will copy the body object for each type of headers (sender, recipient, all, list) and use the right version of it in each case (like for the headers). I am not completely suure if the patch is 100% correct, so please review it thoroughly. It works for me, though. Best regards, Michael --=-1264026611-388570-6488-523-1-= Content-Disposition: attachment; filename="0001-Use-multiple-body-arrays-when-calling-before-edit-fo.patch" Content-Type: application/octet-stream; name="0001-Use-multiple-body-arrays-when-calling-before-edit-fo.patch" Content-Transfer-Encoding: base64 RnJvbSA5NjQ0MDE0NWI1ZWEwNmU0MThjYTMwMWUwMWExYmZkYTVlMTUyN2U2 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBNaWNoYWVsIFN0YXBl bGJlcmcgPG1pY2hhZWxAc3RhcGVsYmVyZy5kZT4KRGF0ZTogV2VkLCAyMCBK YW4gMjAxMCAyMzoyMzoxMiArMDEwMApTdWJqZWN0OiBbUEFUQ0hdIFVzZSBt dWx0aXBsZSBib2R5IGFycmF5cyB3aGVuIGNhbGxpbmcgYmVmb3JlLWVkaXQg Zm9yIGVhY2ggcmVwbHkgdHlwZQoKVGhpcyBhbGxvd3MgZm9yIGJlZm9yZS1l ZGl0IGhvb2tzIHdoaWNoIG1vZGlmeSB0aGUgYm9keSBvZiB0aGUgbWVzc2Fn ZQpiYXNlZCBvbiB0aGUgZGlmZm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IGJvZHksIDp0d2lkZGxlcyA9PiBm YWxzZQorICAgIHN1cGVyIDpoZWFkZXIgPT4gQGhlYWRlcnNbQHR5cGVfc2Vs ZWN0b3IudmFsXSwgOmJvZHkgPT4gQGJvZGllc1tAdHlwZV9zZWxlY3Rvci52 YWxdLCA6dHdpZGRsZXMgPT4gZmFsc2UKICAgICBhZGRfc2VsZWN0b3IgQHR5 cGVfc2VsZWN0b3IKICAgZW5kCiAKQEAgLTE2NCw2ICsxNjYsNyBAQCBwcm90 ZWN0ZWQKICAgICBzdXBlcgogICAgIGlmIEBoZWFkZXJzW0B0eXBlX3NlbGVj dG9yLnZhbF0gIT0gc2VsZi5oZWFkZXIKICAgICAgIHNlbGYuaGVhZGVyID0g QGhlYWRlcnNbQHR5cGVfc2VsZWN0b3IudmFsXQorICAgICAgc2VsZi5ib2R5 ID0gQGJvZGllc1tAdHlwZV9zZWxlY3Rvci52YWxdCiAgICAgICB1cGRhdGUK ICAgICBlbmQKICAgZW5kCkBAIC0xNzIsNiArMTc1LDcgQEAgcHJvdGVjdGVk CiAgICAgc3VwZXIKICAgICBpZiBAaGVhZGVyc1tAdHlwZV9zZWxlY3Rvci52 YWxdICE9IHNlbGYuaGVhZGVyCiAgICAgICBzZWxmLmhlYWRlciA9IEBoZWFk ZXJzW0B0eXBlX3NlbGVjdG9yLnZhbF0KKyAgICAgIHNlbGYuYm9keSA9IEBi b2RpZXNbQHR5cGVfc2VsZWN0b3IudmFsXQogICAgICAgdXBkYXRlCiAgICAg ZW5kCiAgIGVuZAotLSAKMS42LjUKCg== --=-1264026611-388570-6488-523-1-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel --=-1264026611-388570-6488-523-1-=--