Select the types of activity you want to include in your feed.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
···19221922 $query->execute();
1923192319241924 $watcher_phids = $query->getDestinationPHIDs();
19251925+ if ($watcher_phids) {
19261926+ // We need to do a visibility check for all the watchers, as
19271927+ // watching a project is not a guarantee that you can see objects
19281928+ // associated with it.
19291929+ $users = id(new PhabricatorPeopleQuery())
19301930+ ->setViewer($this->requireActor())
19311931+ ->withPHIDs($watcher_phids)
19321932+ ->execute();
1925193319261926- // We need to do a visibility check for all the watchers, as
19271927- // watching a project is not a guarantee that you can see objects
19281928- // associated with it.
19291929- $users = id(new PhabricatorPeopleQuery())
19301930- ->setViewer($this->requireActor())
19311931- ->withPHIDs($watcher_phids)
19321932- ->execute();
19331933-19341934- foreach ($users as $user) {
19351935- $can_see = PhabricatorPolicyFilter::hasCapability(
19361936- $user,
19371937- $object,
19381938- PhabricatorPolicyCapability::CAN_VIEW);
19391939- if ($can_see) {
19401940- $phids[] = $user->getPHID();
19341934+ foreach ($users as $user) {
19351935+ $can_see = PhabricatorPolicyFilter::hasCapability(
19361936+ $user,
19371937+ $object,
19381938+ PhabricatorPolicyCapability::CAN_VIEW);
19391939+ if ($can_see) {
19401940+ $phids[] = $user->getPHID();
19411941+ }
19411942 }
19421943 }
19431944 }