X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fnotifier.php;h=069f3bdf2e37abb655237ac8edbb6692d442b375;hb=eb5e6aae7273fef06a06f983fe78aaad737aa729;hp=bef46677c44a6566130147075123e6b30671670a;hpb=35a9b49ed06c58b53f81cf5ef476191807157925;p=friendica.git diff --git a/include/notifier.php b/include/notifier.php index bef46677c4..069f3bdf2e 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -72,7 +72,7 @@ killme(); } - $r = q("SELECT `contact`.*, `user`.`nickname` + $r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, `user`.`page-flags` FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid` WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1", intval($uid) @@ -87,6 +87,9 @@ // If this is a public conversation, notify the feed hub $notify_hub = true; + // fill this in with a salmon slap if applicable + $slap = ''; + if($cmd != 'mail') { require_once('include/group.php'); @@ -128,8 +131,6 @@ $recipients = array_diff($recipients,$deny); $conversant_str = dbesc(implode(', ',$conversants)); - - } $r = q("SELECT * FROM `contact` WHERE `id` IN ( $conversant_str ) AND `blocked` = 0 AND `pending` = 0"); @@ -199,7 +200,7 @@ $actobj = construct_activity($item); if($item['id'] == $item_id) { - $atom .= replace_macros($cmnt_template, array( + $slap = replace_macros($cmnt_template, array( '$name' => xmlify($owner['name']), '$profile_page' => xmlify($owner['url']), '$thumb' => xmlify($owner['thumb']), @@ -211,6 +212,7 @@ '$published' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)), '$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , ATOM_TIME)), '$location' => xmlify($item['location']), + '$coord' => xmlify($item['coord']), '$type' => 'text', '$verb' => xmlify($verb), '$actobj' => $actobj, @@ -221,6 +223,7 @@ )); } } + $atom .= $slap; } else { foreach($items as $item) { @@ -251,6 +254,7 @@ '$published' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)), '$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , ATOM_TIME)), '$location' => xmlify($item['location']), + '$coord' => xmlify($item['coord']), '$type' => 'text', '$verb' => xmlify($verb), '$actobj' => $actobj, @@ -271,6 +275,7 @@ '$content' => xmlify($item['body']), '$alt' => xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id']), '$location' => xmlify($item['location']), + '$coord' => xmlify($item['coord']), '$type' => 'text', '$verb' => xmlify($verb), '$actobj' => $actobj, @@ -302,6 +307,8 @@ // delivery loop + + foreach($r as $contact) { if($contact['self']) continue; @@ -310,9 +317,13 @@ switch($contact['network']) { case 'dfrn': - $deliver_status = dfrn_deliver($contact,$atom,$debugging); + $deliver_status = dfrn_deliver($owner,$contact,$atom,$debugging); break; default: + if($followup) { + require_once('include/salmon.php'); + slapper($owner,$contact,$slap); + } break; }