]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Notice.php
don't distribute group notices to inboxes for users who've blocked the author
[quix0rs-gnu-social.git] / classes / Notice.php
index a9dbaa461ba806593efbbeb40d4d6e3726aa1bc7..9886875cb79430f1f9f88d8b69bbdd64f183cc88 100644 (file)
@@ -930,7 +930,10 @@ class Notice extends Memcached_DataObject
             $users = $group->getUserMembers();
             foreach ($users as $id) {
                 if (!array_key_exists($id, $ni)) {
-                    $ni[$id] = NOTICE_INBOX_SOURCE_GROUP;
+                    $user = User::staticGet('id', $id);
+                    if (!$user->hasBlocked($notice->profile_id)) {
+                        $ni[$id] = NOTICE_INBOX_SOURCE_GROUP;
+                    }
                 }
             }
         }