mirror of
https://github.com/friendica/friendica
synced 2024-11-10 11:02:53 +00:00
Send a hubsub notification for every comment
This commit is contained in:
parent
18e44001e5
commit
2856042824
2 changed files with 8 additions and 2 deletions
|
@ -118,7 +118,8 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0,
|
|||
// Include answers to status.net posts in pubsub feeds
|
||||
if($forpubsub) {
|
||||
$sql_post_table = "INNER JOIN `thread` ON `thread`.`iid` = `item`.`parent` ";
|
||||
$visibility = "OR (`item`.`network` = 'dfrn' AND `thread`.`network`='stat')";
|
||||
$visibility = sprintf("OR (`item`.`network` = '%s' AND `thread`.`network`='%s')",
|
||||
dbesc(NETWORK_DFRN), dbesc(NETWORK_OSTATUS));
|
||||
$date_field = "`received`";
|
||||
$sql_order = "`item`.`received` DESC";
|
||||
} else {
|
||||
|
|
|
@ -295,13 +295,18 @@ function notifier_run(&$argv, &$argc){
|
|||
$conversant_str = dbesc($parent['contact-id']);
|
||||
$recipients = array($parent['contact-id']);
|
||||
|
||||
if (!$item['private'] AND $item['wall'] AND
|
||||
(strlen($item['allow_cid'].$item['allow_gid'].
|
||||
$item['deny_cid'].$item['deny_gid']) == 0))
|
||||
$push_notify = true;
|
||||
|
||||
if ($parent['network'] == NETWORK_OSTATUS) {
|
||||
logger('Parent is OStatus', LOGGER_DEBUG);
|
||||
|
||||
$push_notify = true;
|
||||
|
||||
// Check if the recipient isn't in your contact list, try to slap it
|
||||
// This doesn't seem to work correctly by now
|
||||
// Not sure if it is working or not.
|
||||
$r = q("SELECT `url` FROM `contact` WHERE `id` = %d", $parent['contact-id']);
|
||||
if (count($r)) {
|
||||
$url_recipients = array();
|
||||
|
|
Loading…
Reference in a new issue