]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Notifier.php
Don't transmit content to already archived contacts
[friendica.git] / src / Worker / Notifier.php
index 42ad0afb6dccaaae72d85e14d0e242eb04890c5c..20023792d51925ca550b1b3685a7f49f284ab535 100644 (file)
@@ -271,9 +271,9 @@ class Notifier
                                }
 
                                $allow_people = expand_acl($parent['allow_cid']);
-                               $allow_groups = Group::expand(expand_acl($parent['allow_gid']),true);
+                               $allow_groups = Group::expand($uid, expand_acl($parent['allow_gid']),true);
                                $deny_people  = expand_acl($parent['deny_cid']);
-                               $deny_groups  = Group::expand(expand_acl($parent['deny_gid']));
+                               $deny_groups  = Group::expand($uid, expand_acl($parent['deny_gid']));
 
                                // if our parent is a public forum (forum_mode == 1), uplink to the origional author causing
                                // a delivery fork. private groups (forum_mode == 2) do not uplink
@@ -429,6 +429,11 @@ class Notifier
 
                        if (DBA::isResult($r)) {
                                foreach ($r as $rr) {
+                                       if (!empty($rr['id']) && Contact::isArchived($rr['id'])) {
+                                               Logger::info('Contact is archived', $rr);
+                                               continue;
+                                       }
+
                                        if (self::isRemovalActivity($cmd, $owner, $rr['network'])) {
                                                Logger::log('Skipping dropping for ' . $rr['url'] . ' since the network supports account removal commands.', Logger::DEBUG);
                                                continue;
@@ -463,6 +468,11 @@ class Notifier
 
                // delivery loop
                while ($contact = DBA::fetch($delivery_contacts_stmt)) {
+                       if (!empty($contact['id']) && Contact::isArchived($contact['id'])) {
+                               Logger::info('Contact is archived', $contact);
+                               continue;
+                       }
+
                        if (self::isRemovalActivity($cmd, $owner, $contact['network'])) {
                                Logger::log('Skipping dropping for ' . $contact['url'] . ' since the network supports account removal commands.', Logger::DEBUG);
                                continue;