mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-18 18:51:12 +01:00
Email Preferences - round out options for Projects and Phriction
Summary: Fixes T8524, T8550. These were both missing "subscribers" and Phriction was also the only application with no "other". Test Plan: - Project - set user A to notify only for project subscriber changes - made a project with user A - subscribed user B to project - verified notification sent to user A - used ./bin/mail to make sure no mail was sent to user A because "This mail has tags which control which users receive it, and this recipient has not elected to receive mail with any of the tags on this message (Settings > Email Preferences)." - Phriction - set user A to notify only for phriction document subscriber changes - made a document with user A - subscribed user B to document - verified notification sent to user A - used ./bin/mail to make sure no mail was sent to user A because "This mail has tags which control which users receive it, and this recipient has not elected to receive mail with any of the tags on this message (Settings > Email Preferences)." - observed option for "other" in email preferences Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T8524, T8550 Differential Revision: https://secure.phabricator.com/D13313
This commit is contained in:
parent
6b7d7401ca
commit
8965c7ec9b
4 changed files with 25 additions and 8 deletions
|
@ -391,6 +391,10 @@ final class PhrictionTransactionEditor
|
|||
pht("A document's content changes."),
|
||||
PhrictionTransaction::MAILTAG_DELETE =>
|
||||
pht('A document is deleted.'),
|
||||
PhrictionTransaction::MAILTAG_SUBSCRIBERS =>
|
||||
pht('A document\'s subscribers change.'),
|
||||
PhrictionTransaction::MAILTAG_OTHER =>
|
||||
pht('Other document activity not listed above occurs.'),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,9 +9,11 @@ final class PhrictionTransaction
|
|||
const TYPE_MOVE_TO = 'move-to';
|
||||
const TYPE_MOVE_AWAY = 'move-away';
|
||||
|
||||
const MAILTAG_TITLE = 'phriction-title';
|
||||
const MAILTAG_CONTENT = 'phriction-content';
|
||||
const MAILTAG_DELETE = 'phriction-delete';
|
||||
const MAILTAG_TITLE = 'phriction-title';
|
||||
const MAILTAG_CONTENT = 'phriction-content';
|
||||
const MAILTAG_DELETE = 'phriction-delete';
|
||||
const MAILTAG_SUBSCRIBERS = 'phriction-subscribers';
|
||||
const MAILTAG_OTHER = 'phriction-other';
|
||||
|
||||
public function getApplicationName() {
|
||||
return 'phriction';
|
||||
|
@ -280,7 +282,12 @@ final class PhrictionTransaction
|
|||
case self::TYPE_DELETE:
|
||||
$tags[] = self::MAILTAG_DELETE;
|
||||
break;
|
||||
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
$tags[] = self::MAILTAG_SUBSCRIBERS;
|
||||
break;
|
||||
default:
|
||||
$tags[] = self::MAILTAG_OTHER;
|
||||
break;
|
||||
}
|
||||
return $tags;
|
||||
}
|
||||
|
|
|
@ -433,6 +433,8 @@ final class PhabricatorProjectTransactionEditor
|
|||
pht('Project membership changes.'),
|
||||
PhabricatorProjectTransaction::MAILTAG_WATCHERS =>
|
||||
pht('Project watcher list changes.'),
|
||||
PhabricatorProjectTransaction::MAILTAG_SUBSCRIBERS =>
|
||||
pht('Project subscribers change.'),
|
||||
PhabricatorProjectTransaction::MAILTAG_OTHER =>
|
||||
pht('Other project activity not listed above occurs.'),
|
||||
);
|
||||
|
|
|
@ -14,10 +14,11 @@ final class PhabricatorProjectTransaction
|
|||
// NOTE: This is deprecated, members are just a normal edge now.
|
||||
const TYPE_MEMBERS = 'project:members';
|
||||
|
||||
const MAILTAG_METADATA = 'project-metadata';
|
||||
const MAILTAG_MEMBERS = 'project-members';
|
||||
const MAILTAG_WATCHERS = 'project-watchers';
|
||||
const MAILTAG_OTHER = 'project-other';
|
||||
const MAILTAG_METADATA = 'project-metadata';
|
||||
const MAILTAG_MEMBERS = 'project-members';
|
||||
const MAILTAG_SUBSCRIBERS = 'project-subscribers';
|
||||
const MAILTAG_WATCHERS = 'project-watchers';
|
||||
const MAILTAG_OTHER = 'project-other';
|
||||
|
||||
public function getApplicationName() {
|
||||
return 'project';
|
||||
|
@ -369,6 +370,9 @@ final class PhabricatorProjectTransaction
|
|||
case self::TYPE_COLOR:
|
||||
$tags[] = self::MAILTAG_METADATA;
|
||||
break;
|
||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
$tags[] = self::MAILTAG_SUBSCRIBERS;
|
||||
break;
|
||||
case PhabricatorTransactions::TYPE_EDGE:
|
||||
$type = $this->getMetadata('edge:type');
|
||||
$type = head($type);
|
||||
|
|
Loading…
Reference in a new issue