]> git.mxchange.org Git - friendica.git/blobdiff - include/notifier.php
Mail: real threading now works with outgoing mails.
[friendica.git] / include / notifier.php
index c522bcb6bc1ec00c457b51a0e5aadd26525c3e02..b5a92ff2526c5675e8825307fb9fec403b5a24f5 100644 (file)
@@ -790,7 +790,13 @@ function notifier_run(&$argv, &$argc){
                                                $headers .= 'Message-Id: <' . iri2msgid($it['uri']) . '>' . "\n";
 
                                                if($it['uri'] !== $it['parent-uri']) {
-                                                       $headers .= 'References: <' . iri2msgid($it['parent-uri']) . '>' . "\n";
+                                                       $headers .= "References: <".iri2msgid($it["parent-uri"]).">";
+
+                                                       // If Threading is enabled, write down the correct parent
+                                                       if (($it["thr-parent"] != "") and ($it["thr-parent"] != $it["parent-uri"]))
+                                                               $headers .= " <".iri2msgid($it["thr-parent"]).">";
+                                                       $headers .= "\n";
+
                                                        if(!$it['title']) {
                                                                $r = q("SELECT `title` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
                                                                        dbesc($it['parent-uri']),