Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96482602
PhabricatorAuditMailReceiver.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Dec 27, 04:18
Size
942 B
Mime Type
text/x-php
Expires
Sun, Dec 29, 04:18 (2 d)
Engine
blob
Format
Raw Data
Handle
23191046
Attached To
rPH Phabricator
PhabricatorAuditMailReceiver.php
View Options
<?php
final
class
PhabricatorAuditMailReceiver
extends
PhabricatorObjectMailReceiver
{
public
function
isEnabled
()
{
$app_class
=
'PhabricatorAuditApplication'
;
return
PhabricatorApplication
::
isClassInstalled
(
$app_class
);
}
protected
function
getObjectPattern
()
{
return
'C[1-9]
\d
*'
;
}
protected
function
loadObject
(
$pattern
,
PhabricatorUser
$viewer
)
{
$id
=
(
int
)
trim
(
$pattern
,
'C'
);
return
id
(
new
DiffusionCommitQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
array
(
$id
))
->
executeOne
();
}
protected
function
processReceivedObjectMail
(
PhabricatorMetaMTAReceivedMail
$mail
,
PhabricatorLiskDAO
$object
,
PhabricatorUser
$sender
)
{
$handler
=
PhabricatorAuditCommentEditor
::
newReplyHandlerForCommit
(
$object
);
$handler
->
setActor
(
$sender
);
$handler
->
setExcludeMailRecipientPHIDs
(
$mail
->
loadExcludeMailRecipientPHIDs
());
$handler
->
processEmail
(
$mail
);
}
}
Event Timeline
Log In to Comment