Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99449155
ManiphestTaskMailReceiver.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, Jan 24, 16:15
Size
1023 B
Mime Type
text/x-php
Expires
Sun, Jan 26, 16:15 (2 d)
Engine
blob
Format
Raw Data
Handle
23803348
Attached To
rPH Phabricator
ManiphestTaskMailReceiver.php
View Options
<?php
final
class
ManiphestTaskMailReceiver
extends
PhabricatorObjectMailReceiver
{
public
function
isEnabled
()
{
$app_class
=
'PhabricatorApplicationManiphest'
;
return
PhabricatorApplication
::
isClassInstalled
(
$app_class
);
}
protected
function
getObjectPattern
()
{
return
'T[1-9]
\d
*'
;
}
protected
function
loadObject
(
$pattern
,
PhabricatorUser
$viewer
)
{
$id
=
(
int
)
trim
(
$pattern
,
'T'
);
$results
=
id
(
new
ManiphestTaskQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
array
(
$id
))
->
execute
();
return
head
(
$results
);
}
protected
function
processReceivedObjectMail
(
PhabricatorMetaMTAReceivedMail
$mail
,
PhabricatorLiskDAO
$object
,
PhabricatorUser
$sender
)
{
$handler
=
PhabricatorEnv
::
newObjectFromConfig
(
'metamta.maniphest.reply-handler'
);
$handler
->
setMailReceiver
(
$object
);
$handler
->
setActor
(
$sender
);
$handler
->
setExcludeMailRecipientPHIDs
(
$mail
->
loadExcludeMailRecipientPHIDs
());
$handler
->
processEmail
(
$mail
);
}
}
Event Timeline
Log In to Comment