]> git.mxchange.org Git - friendica.git/commitdiff
Send a hubsub notification for every comment
authorMichael Vogel <icarus@dabo.de>
Sun, 31 May 2015 08:38:00 +0000 (10:38 +0200)
committerMichael Vogel <icarus@dabo.de>
Sun, 31 May 2015 08:38:00 +0000 (10:38 +0200)
include/items.php
include/notifier.php

index 2c4ae9e5cafb845631480e79d6f78e5dcba7047c..87a7daea0b42407a0dc1af8918c0ee1661ddcbd7 100644 (file)
@@ -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 {
index 318e0eab25f13995f75c56b22de2320ba2f59e74..dc4e1a2394e7aab5ee5f1e42a6b4865288735ee3 100644 (file)
@@ -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();