put a variant of the parent_uri into email notification message-ids. Current message-ids aren't completel legal. More work to do.
This commit is contained in:
parent
6184b5cf5a
commit
68d7a3ae01
4 changed files with 12 additions and 6 deletions
|
@ -1350,7 +1350,7 @@ function diaspora_comment($importer,$xml,$msg) {
|
||||||
'verb' => ACTIVITY_POST,
|
'verb' => ACTIVITY_POST,
|
||||||
'otype' => 'item',
|
'otype' => 'item',
|
||||||
'parent' => $conv_parent,
|
'parent' => $conv_parent,
|
||||||
|
'parent_uri' => $parent_uri
|
||||||
));
|
));
|
||||||
|
|
||||||
// only send one notification
|
// only send one notification
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require_once('include/email.php');
|
||||||
|
|
||||||
function notification($params) {
|
function notification($params) {
|
||||||
|
|
||||||
logger('notification: entry', LOGGER_DEBUG);
|
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 so, create the record of it and use a message-id smtp header.
|
||||||
|
|
||||||
if(!$r) {
|
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);
|
intval($params['uid']), LOGGER_DEBUG);
|
||||||
$r = q("insert into `notify-threads` (`notify-id`, `master-parent-item`, `receiver-uid`, `parent-item`)
|
$r = q("insert into `notify-threads` (`notify-id`, `master-parent-item`, `receiver-uid`, `parent-item`)
|
||||||
values(%d,%d,%d,%d)",
|
values(%d,%d,%d,%d)",
|
||||||
|
@ -495,7 +497,7 @@ class enotify {
|
||||||
$multipartMessageBody, // message body
|
$multipartMessageBody, // message body
|
||||||
$messageHeader // message headers
|
$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);
|
logger("notification: enotify::send returns " . $res, LOGGER_DEBUG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2778,12 +2778,14 @@ function local_delivery($importer,$data) {
|
||||||
$parent = 0;
|
$parent = 0;
|
||||||
|
|
||||||
if($posted_id) {
|
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($posted_id),
|
||||||
intval($importer['importer_uid'])
|
intval($importer['importer_uid'])
|
||||||
);
|
);
|
||||||
if(count($r))
|
if(count($r)) {
|
||||||
$parent = $r[0]['parent'];
|
$parent = $r[0]['parent'];
|
||||||
|
$parent_uri = $r[0]['parent-uri'];
|
||||||
|
}
|
||||||
|
|
||||||
if(! $is_like) {
|
if(! $is_like) {
|
||||||
$r1 = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `uid` = %d AND `parent` = %d",
|
$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,
|
'verb' => ACTIVITY_POST,
|
||||||
'otype' => 'item',
|
'otype' => 'item',
|
||||||
'parent' => $parent,
|
'parent' => $parent,
|
||||||
|
'parent_uri' => $parent_uri,
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2972,6 +2974,7 @@ function local_delivery($importer,$data) {
|
||||||
'verb' => ACTIVITY_POST,
|
'verb' => ACTIVITY_POST,
|
||||||
'otype' => 'item',
|
'otype' => 'item',
|
||||||
'parent' => $conv_parent,
|
'parent' => $conv_parent,
|
||||||
|
'parent_uri' => $parent_uri
|
||||||
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -748,6 +748,7 @@ function item_post(&$a) {
|
||||||
'verb' => ACTIVITY_POST,
|
'verb' => ACTIVITY_POST,
|
||||||
'otype' => 'item',
|
'otype' => 'item',
|
||||||
'parent' => $parent,
|
'parent' => $parent,
|
||||||
|
'parent_uri' => $parent_item['uri']
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue