Bug #9271: Fix auto-reply when replying to own messages
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 1 Oct 2010 06:38:30 +0000 (00:38 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 1 Oct 2010 06:38:30 +0000 (00:38 -0600)
imp/lib/Compose.php

index 524a006..1d21a4e 100644 (file)
@@ -1789,7 +1789,11 @@ class IMP_Compose
     protected function _getMatchingIdentity($h)
     {
         $msgAddresses = array();
-        foreach (array('to', 'cc', 'bcc') as $val) {
+
+        /* Bug #9271: Check 'from' address first; if replying to a message
+         * originally sent by user, this should be the identity used for the
+         * reply also. */
+        foreach (array('from', 'to', 'cc', 'bcc') as $val) {
             $msgAddresses[] = $h->getValue($val);
         }