mirror of
https://github.com/friendica/friendica
synced 2025-04-27 05:10:10 +00:00
OStatus: Salmon now works with "likes"/The alias is stored now as well
This commit is contained in:
parent
d4fd01e25e
commit
08fb662b4a
2 changed files with 22 additions and 7 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue