]> git.mxchange.org Git - friendica.git/commitdiff
put a variant of the parent_uri into email notification message-ids. Current message...
authorfriendica <info@friendica.com>
Thu, 16 Aug 2012 00:14:29 +0000 (17:14 -0700)
committerfriendica <info@friendica.com>
Thu, 16 Aug 2012 00:14:29 +0000 (17:14 -0700)
include/diaspora.php
include/enotify.php
include/items.php
mod/item.php

index 3e9f20a471ceb3163bccd76c2f0b2b4c1bf4ed5d..baee0420ba6439f907eb8d2bfbab417fa47b9249 100755 (executable)
@@ -1350,7 +1350,7 @@ function diaspora_comment($importer,$xml,$msg) {
                                'verb'         => ACTIVITY_POST,
                                'otype'        => 'item',
                                'parent'       => $conv_parent,
-
+                               'parent_uri'   => $parent_uri
                        ));
 
                        // only send one notification
index 07e091d3a9541a82cfdb1e642cdd7da83a7987dc..b4331f0926679a871249e83cdba43c4f5fdb5ed2 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+require_once('include/email.php');
+
 function notification($params) {
 
        logger('notification: entry', LOGGER_DEBUG);
@@ -324,7 +326,7 @@ function notification($params) {
                // If so, create the record of it and use a message-id smtp header.
 
                if(!$r) {
-                       logger("norify_id:" . intval($notify_id). ", parent: " . intval($params['parent']) . "uid: " . 
+                       logger("notify_id:" . intval($notify_id). ", parent: " . intval($params['parent']) . "uid: " . 
 intval($params['uid']), LOGGER_DEBUG);
                        $r = q("insert into `notify-threads` (`notify-id`, `master-parent-item`, `receiver-uid`, `parent-item`)
                                values(%d,%d,%d,%d)",
@@ -495,7 +497,7 @@ class enotify {
                        $multipartMessageBody,                                                  // message body
                        $messageHeader                                                                  // message headers
                );
-               logger("notification: enotify::send header " . $header, LOGGER_DEBUG);
+               logger("notification: enotify::send header " . 'To: ' . $params['toEmail'] . "\n" . $messageHeader, LOGGER_DEBUG);
                logger("notification: enotify::send returns " . $res, LOGGER_DEBUG);
        }
 }
index ff7da286e28ef738c612e98849979b7620fcf38a..8de6f7cc8eb2b4faa465e3a0715512f9aaee2f11 100755 (executable)
@@ -2778,12 +2778,14 @@ function local_delivery($importer,$data) {
                                $parent = 0;
 
                                if($posted_id) {
-                                       $r = q("SELECT `parent` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+                                       $r = q("SELECT `parent`, `parent-uri` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                                                intval($posted_id),
                                                intval($importer['importer_uid'])
                                        );
-                                       if(count($r))
+                                       if(count($r)) {
                                                $parent = $r[0]['parent'];
+                                               $parent_uri = $r[0]['parent-uri'];
+                                       }
                        
                                        if(! $is_like) {
                                                $r1 = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `uid` = %d AND `parent` = %d",
@@ -2823,7 +2825,7 @@ function local_delivery($importer,$data) {
                                                                'verb'         => ACTIVITY_POST,
                                                                'otype'        => 'item',
                                                                'parent'       => $parent,
-
+                                                               'parent_uri'   => $parent_uri,
                                                        ));
 
                                                }
@@ -2972,6 +2974,7 @@ function local_delivery($importer,$data) {
                                                                        'verb'         => ACTIVITY_POST,
                                                                        'otype'        => 'item',
                                                                        'parent'       => $conv_parent,
+                                                                       'parent_uri'   => $parent_uri
 
                                                                ));
 
index c7b755eaed12582d5070f72bbc652b47066b2e1a..6c1c06f99a901ea505dba9368252285ad821936e 100644 (file)
@@ -748,6 +748,7 @@ function item_post(&$a) {
                                        'verb'         => ACTIVITY_POST,
                                        'otype'        => 'item',
                                        'parent'       => $parent,
+                                       'parent_uri'   => $parent_item['uri']
                                ));
                        
                        }