]> git.mxchange.org Git - friendica.git/commitdiff
We do the notify stuff now directly in the item class
authorMichael <heluecht@pirati.ca>
Tue, 15 May 2018 19:50:29 +0000 (19:50 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 15 May 2018 19:50:29 +0000 (19:50 +0000)
src/Protocol/DFRN.php
src/Protocol/Diaspora.php

index c41481872a0be7305f75388b951376765444c5b8..51ec9ade9be81e72444d2925cb3880b9e960ac11 100644 (file)
@@ -2719,23 +2719,6 @@ class DFRN
                                        Item::distribute($posted_id);
                                }
 
-                               $item["id"] = $posted_id;
-
-                               $r = q(
-                                       "SELECT `parent`, `parent-uri` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
-                                       intval($posted_id),
-                                       intval($importer["importer_uid"])
-                               );
-                               if (DBM::is_result($r)) {
-                                       $parent = $r[0]["parent"];
-                                       $parent_uri = $r[0]["parent-uri"];
-                               }
-
-                               if ($posted_id && $parent && ($entrytype == DFRN::REPLY_RC)) {
-                                       logger("Notifying followers about comment ".$posted_id, LOGGER_DEBUG);
-                                       Worker::add(PRIORITY_HIGH, "Notifier", "comment-import", $posted_id);
-                               }
-
                                return true;
                        }
                } else { // $entrytype == DFRN::TOP_LEVEL
@@ -2837,14 +2820,6 @@ class DFRN
                }
 
                Item::deleteById($item["id"]);
-
-               if ($entrytype != DFRN::TOP_LEVEL) {
-                       // if this is a relayed delete, propagate it to other recipients
-                       if ($entrytype == DFRN::REPLY_RC) {
-                               logger("Notifying followers about deletion of post " . $item["id"], LOGGER_DEBUG);
-                               Worker::add(PRIORITY_HIGH, "Notifier", "drop", $item["id"]);
-                       }
-               }
        }
 
        /**
index adb1e8cbfa061bcd67ec4d6e3efca120065d2463..bae2eb6a2a2091372642e16f8e3d224248eec370 100644 (file)
@@ -2868,12 +2868,6 @@ class Diaspora
                        Item::deleteById($item["id"]);
 
                        logger("Deleted target ".$target_guid." (".$item["id"].") from user ".$item["uid"]." parent: ".$item["parent"], LOGGER_DEBUG);
-
-                       // Now check if the retraction needs to be relayed by us
-                       if ($parent["origin"]) {
-                               // notify others
-                               Worker::add(PRIORITY_HIGH, "Notifier", "drop", $item["id"]);
-                       }
                }
 
                return true;