Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/query/PhabricatorMetaMTAActor.php
Show All 15 Lines | final class PhabricatorMetaMTAActor extends Phobject { | ||||
const REASON_SELF = 'self'; | const REASON_SELF = 'self'; | ||||
const REASON_MAILTAGS = 'mailtags'; | const REASON_MAILTAGS = 'mailtags'; | ||||
const REASON_BOT = 'bot'; | const REASON_BOT = 'bot'; | ||||
const REASON_FORCE = 'force'; | const REASON_FORCE = 'force'; | ||||
const REASON_FORCE_HERALD = 'force-herald'; | const REASON_FORCE_HERALD = 'force-herald'; | ||||
const REASON_ROUTE_AS_NOTIFICATION = 'route-as-notification'; | const REASON_ROUTE_AS_NOTIFICATION = 'route-as-notification'; | ||||
const REASON_ROUTE_AS_MAIL = 'route-as-mail'; | const REASON_ROUTE_AS_MAIL = 'route-as-mail'; | ||||
const REASON_UNVERIFIED = 'unverified'; | const REASON_UNVERIFIED = 'unverified'; | ||||
const REASON_MUTED = 'muted'; | |||||
private $phid; | private $phid; | ||||
private $emailAddress; | private $emailAddress; | ||||
private $name; | private $name; | ||||
private $status = self::STATUS_DELIVERABLE; | private $status = self::STATUS_DELIVERABLE; | ||||
private $reasons = array(); | private $reasons = array(); | ||||
private $isVerified = false; | private $isVerified = false; | ||||
▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | $names = array( | ||||
self::REASON_MAIL_DISABLED => pht('Mail Disabled'), | self::REASON_MAIL_DISABLED => pht('Mail Disabled'), | ||||
self::REASON_MAILTAGS => pht('Mail Tags'), | self::REASON_MAILTAGS => pht('Mail Tags'), | ||||
self::REASON_UNLOADABLE => pht('Bad Recipient'), | self::REASON_UNLOADABLE => pht('Bad Recipient'), | ||||
self::REASON_FORCE => pht('Forced Mail'), | self::REASON_FORCE => pht('Forced Mail'), | ||||
self::REASON_FORCE_HERALD => pht('Forced by Herald'), | self::REASON_FORCE_HERALD => pht('Forced by Herald'), | ||||
self::REASON_ROUTE_AS_NOTIFICATION => pht('Route as Notification'), | self::REASON_ROUTE_AS_NOTIFICATION => pht('Route as Notification'), | ||||
self::REASON_ROUTE_AS_MAIL => pht('Route as Mail'), | self::REASON_ROUTE_AS_MAIL => pht('Route as Mail'), | ||||
self::REASON_UNVERIFIED => pht('Address Not Verified'), | self::REASON_UNVERIFIED => pht('Address Not Verified'), | ||||
self::REASON_MUTED => pht('Muted'), | |||||
); | ); | ||||
return idx($names, $reason, pht('Unknown ("%s")', $reason)); | return idx($names, $reason, pht('Unknown ("%s")', $reason)); | ||||
} | } | ||||
public static function getReasonDescription($reason) { | public static function getReasonDescription($reason) { | ||||
$descriptions = array( | $descriptions = array( | ||||
self::REASON_NONE => pht( | self::REASON_NONE => pht( | ||||
Show All 40 Lines | $descriptions = array( | ||||
self::REASON_ROUTE_AS_NOTIFICATION => pht( | self::REASON_ROUTE_AS_NOTIFICATION => pht( | ||||
'This message was downgraded to a notification by outbound mail '. | 'This message was downgraded to a notification by outbound mail '. | ||||
'rules in Herald.'), | 'rules in Herald.'), | ||||
self::REASON_ROUTE_AS_MAIL => pht( | self::REASON_ROUTE_AS_MAIL => pht( | ||||
'This message was upgraded to email by outbound mail rules '. | 'This message was upgraded to email by outbound mail rules '. | ||||
'in Herald.'), | 'in Herald.'), | ||||
self::REASON_UNVERIFIED => pht( | self::REASON_UNVERIFIED => pht( | ||||
'This recipient does not have a verified primary email address.'), | 'This recipient does not have a verified primary email address.'), | ||||
self::REASON_MUTED => pht( | |||||
'This recipient has muted notifications for this object.'), | |||||
); | ); | ||||
return idx($descriptions, $reason, pht('Unknown Reason ("%s")', $reason)); | return idx($descriptions, $reason, pht('Unknown Reason ("%s")', $reason)); | ||||
} | } | ||||
} | } |