]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't distribute group notices to inboxes for users who've blocked the author
authorEvan Prodromou <evan@status.net>
Sat, 7 Nov 2009 17:22:00 +0000 (12:22 -0500)
committerEvan Prodromou <evan@status.net>
Sat, 7 Nov 2009 17:22:00 +0000 (12:22 -0500)
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;
+                    }
                 }
             }
         }