'verb' => ACTIVITY_POST,
'otype' => 'item',
'parent' => $conv_parent,
-
+ 'parent_uri' => $parent_uri
));
// only send one notification
<?php
+require_once('include/email.php');
+
function notification($params) {
logger('notification: entry', LOGGER_DEBUG);
// 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)",
$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);
}
}
$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",
'verb' => ACTIVITY_POST,
'otype' => 'item',
'parent' => $parent,
-
+ 'parent_uri' => $parent_uri,
));
}
'verb' => ACTIVITY_POST,
'otype' => 'item',
'parent' => $conv_parent,
+ 'parent_uri' => $parent_uri
));