X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fnotifier.php;h=6c90629bd87128865e0535d80e1a0523ae1f7ce7;hb=7e6598f2c01dc25b9420309dac1ec84160f21a03;hp=18a617ac2f5698ed9605e87acfcfbce7cd50f70d;hpb=b93e1d73a1a3823fbb3fd317a85be17e8fad1d3c;p=friendica.git diff --git a/include/notifier.php b/include/notifier.php index 18a617ac2f..6c90629bd8 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -229,7 +229,7 @@ function notifier_run(&$argv, &$argc){ $parent = $items[0]; - $thr_parent = q("SELECT `network` FROM `item` WHERE `uri` = '%s' AND `uid` = %d", + $thr_parent = q("SELECT `network`, `author-link`, `owner-link` FROM `item` WHERE `uri` = '%s' AND `uid` = %d", dbesc($target_item["thr-parent"]), intval($target_item["uid"])); logger('Parent is '.$parent['network'].'. Thread parent is '.$thr_parent[0]['network'], LOGGER_DEBUG); @@ -390,6 +390,20 @@ function notifier_run(&$argv, &$argc){ logger('Some parent is OStatus for '.$target_item["guid"], LOGGER_DEBUG); + // Send a salmon to the parent author + $probed_contact = probe_url($thr_parent[0]['author-link']); + if ($probed_contact["notify"] != "") { + logger('Notify parent author '.$probed_contact["url"].': '.$probed_contact["notify"]); + $url_recipients[$probed_contact["notify"]] = $probed_contact["notify"]; + } + + // Send a salmon to the parent owner + $probed_contact = probe_url($thr_parent[0]['owner-link']); + if ($probed_contact["notify"] != "") { + logger('Notify parent owner '.$probed_contact["url"].': '.$probed_contact["notify"]); + $url_recipients[$probed_contact["notify"]] = $probed_contact["notify"]; + } + // Send a salmon notification to every person we mentioned in the post $arr = explode(',',$target_item['tag']); foreach($arr as $x) { @@ -535,7 +549,7 @@ function notifier_run(&$argv, &$argc){ if($public_message) { - if (!$followup AND $top_level) + if (!$followup) $r0 = diaspora::relay_list(); else $r0 = array();