Changeset View
Changeset View
Standalone View
Standalone View
src/applications/feed/PhabricatorFeedStoryPublisher.php
| Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Lines | final class PhabricatorFeedStoryPublisher extends Phobject { | ||||
| * @param list<phid> List of potential subscribers. | * @param list<phid> List of potential subscribers. | ||||
| * @return list<phid> List of actual subscribers. | * @return list<phid> List of actual subscribers. | ||||
| */ | */ | ||||
| private function filterSubscribedPHIDs(array $phids) { | private function filterSubscribedPHIDs(array $phids) { | ||||
| $phids = $this->expandRecipients($phids); | $phids = $this->expandRecipients($phids); | ||||
| $tags = $this->getMailTags(); | $tags = $this->getMailTags(); | ||||
| if ($tags) { | if ($tags) { | ||||
| $all_prefs = id(new PhabricatorUserPreferences())->loadAllWhere( | $all_prefs = id(new PhabricatorUserPreferencesQuery()) | ||||
| 'userPHID in (%Ls)', | ->setViewer(PhabricatorUser::getOmnipotentUser()) | ||||
| $phids); | ->withUserPHIDs($phids) | ||||
| ->execute(); | |||||
| $all_prefs = mpull($all_prefs, null, 'getUserPHID'); | $all_prefs = mpull($all_prefs, null, 'getUserPHID'); | ||||
| } | } | ||||
| $pref_default = PhabricatorUserPreferences::MAILTAG_PREFERENCE_EMAIL; | $pref_default = PhabricatorUserPreferences::MAILTAG_PREFERENCE_EMAIL; | ||||
| $pref_ignore = PhabricatorUserPreferences::MAILTAG_PREFERENCE_IGNORE; | $pref_ignore = PhabricatorUserPreferences::MAILTAG_PREFERENCE_IGNORE; | ||||
| $keep = array(); | $keep = array(); | ||||
| foreach ($phids as $phid) { | foreach ($phids as $phid) { | ||||
| ▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines | |||||