Add basic "Subscriptions" application
Summary:
Basic infrastructure for generalizing subscriptions/CCs for T1808, T1514 and T1663.
- Implement `PhabricatorSubscribableInterface` and you'll get a subscribe/unsubscribe button for free.
- If there are any auto-subscribed users (like the question author) you can specify them; this makes more sense for Tasks and Revisions than Ponder probably, but maybe the author should be auto-subscribed.
- Subscriptions are either "explicit" (the user clicked 'subscribe') or "implicit" (the user did something which causes them to become subscribed naturally). If a user unsubscribes, they'll no longer be added by implicit subscriptions. This may or may not be relevant to Ponder but is an existing Herald feature in Differential.
- Helper method on PhabricatorSubscribersQuery to load subscribers.
- This doesn't handle actually sending email, etc. I think that's all so application-specific that it doesn't belong here.
- Now seems to work.
Test Plan:
{F20552}
{F20553}
Reviewers: pieter, btrahan
Reviewed By: pieter
CC: aran
Maniphest Tasks: T1663, T1514, T1808
Differential Revision: https://secure.phabricator.com/D3637
This commit is contained in:
@@ -169,18 +169,21 @@ $action_template = id(new PhutilSprite())
|
||||
->setSourceSize(16, 16);
|
||||
|
||||
$action_map = array(
|
||||
'file' => 'icon/page_white_text.png',
|
||||
'fork' => 'icon/arrow_branch.png',
|
||||
'edit' => 'icon/page_white_edit.png',
|
||||
'flag-0' => 'icon/flag-0.png',
|
||||
'flag-1' => 'icon/flag-1.png',
|
||||
'flag-2' => 'icon/flag-2.png',
|
||||
'flag-3' => 'icon/flag-3.png',
|
||||
'flag-4' => 'icon/flag-4.png',
|
||||
'flag-5' => 'icon/flag-5.png',
|
||||
'flag-6' => 'icon/flag-6.png',
|
||||
'flag-7' => 'icon/flag-7.png',
|
||||
'flag-ghost' => 'icon/flag-ghost.png',
|
||||
'file' => 'icon/page_white_text.png',
|
||||
'fork' => 'icon/arrow_branch.png',
|
||||
'edit' => 'icon/page_white_edit.png',
|
||||
'flag-0' => 'icon/flag-0.png',
|
||||
'flag-1' => 'icon/flag-1.png',
|
||||
'flag-2' => 'icon/flag-2.png',
|
||||
'flag-3' => 'icon/flag-3.png',
|
||||
'flag-4' => 'icon/flag-4.png',
|
||||
'flag-5' => 'icon/flag-5.png',
|
||||
'flag-6' => 'icon/flag-6.png',
|
||||
'flag-7' => 'icon/flag-7.png',
|
||||
'flag-ghost' => 'icon/flag-ghost.png',
|
||||
'subscribe-auto' => 'icon/unsubscribe.png',
|
||||
'subscribe-add' => 'icon/subscribe.png',
|
||||
'subscribe-delete' => 'icon/unsubscribe.png',
|
||||
);
|
||||
|
||||
foreach ($action_map as $icon => $source) {
|
||||
|
||||
Reference in New Issue
Block a user