Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13965338
D9377.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9377.id.diff
View Options
diff --git a/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php b/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php
--- a/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php
+++ b/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php
@@ -37,10 +37,24 @@
->withPHIDs(array($phid))
->executeOne();
- $object = id(new PhabricatorObjectQuery())
- ->setViewer($user)
- ->withPHIDs(array($phid))
- ->executeOne();
+ if (phid_get_type($phid) == PhabricatorProjectPHIDTypeProject::TYPECONST) {
+ // TODO: This is a big hack, but a weak argument for adding some kind
+ // of "load for role" feature to ObjectQuery, and also not a really great
+ // argument for adding some kind of "load extra stuff" feature to
+ // SubscriberInterface. Do this for now and wait for the best way forward
+ // to become more clear?
+
+ $object = id(new PhabricatorProjectQuery())
+ ->setViewer($user)
+ ->withPHIDs(array($phid))
+ ->needWatchers(true)
+ ->executeOne();
+ } else {
+ $object = id(new PhabricatorObjectQuery())
+ ->setViewer($user)
+ ->withPHIDs(array($phid))
+ ->executeOne();
+ }
if (!($object instanceof PhabricatorSubscribableInterface)) {
return $this->buildErrorResponse(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 17 2024, 1:26 AM (4 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6720020
Default Alt Text
D9377.id.diff (1 KB)
Attached To
Mode
D9377: Fix unsubscribing from projects in a gross, hacky way
Attached
Detach File
Event Timeline
Log In to Comment