Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14029353
D14454.id34948.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D14454.id34948.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -3280,6 +3280,7 @@
'PhamePostEditor' => 'applications/phame/editor/PhamePostEditor.php',
'PhamePostFramedController' => 'applications/phame/controller/post/PhamePostFramedController.php',
'PhamePostListController' => 'applications/phame/controller/post/PhamePostListController.php',
+ 'PhamePostMailReceiver' => 'applications/phame/mail/PhamePostMailReceiver.php',
'PhamePostNewController' => 'applications/phame/controller/post/PhamePostNewController.php',
'PhamePostNotLiveController' => 'applications/phame/controller/post/PhamePostNotLiveController.php',
'PhamePostPreviewController' => 'applications/phame/controller/post/PhamePostPreviewController.php',
@@ -7561,6 +7562,7 @@
'PhamePostEditor' => 'PhabricatorApplicationTransactionEditor',
'PhamePostFramedController' => 'PhamePostController',
'PhamePostListController' => 'PhamePostController',
+ 'PhamePostMailReceiver' => 'PhabricatorObjectMailReceiver',
'PhamePostNewController' => 'PhamePostController',
'PhamePostNotLiveController' => 'PhamePostController',
'PhamePostPreviewController' => 'PhamePostController',
diff --git a/src/applications/phame/mail/PhamePostMailReceiver.php b/src/applications/phame/mail/PhamePostMailReceiver.php
new file mode 100644
--- /dev/null
+++ b/src/applications/phame/mail/PhamePostMailReceiver.php
@@ -0,0 +1,28 @@
+<?php
+
+final class PhamePostMailReceiver
+ extends PhabricatorObjectMailReceiver {
+
+ public function isEnabled() {
+ return PhabricatorApplication::isClassInstalled(
+ 'PhabricatorPhameApplication');
+ }
+
+ protected function getObjectPattern() {
+ return 'POST[1-9]\d*';
+ }
+
+ protected function loadObject($pattern, PhabricatorUser $viewer) {
+ $id = (int)substr($pattern, 4);
+
+ return id(new PhamePostQuery())
+ ->setViewer($viewer)
+ ->withIDs(array($id))
+ ->executeOne();
+ }
+
+ protected function getTransactionReplyHandler() {
+ return new PhamePostReplyHandler();
+ }
+
+}
diff --git a/src/applications/phame/mail/PhamePostReplyHandler.php b/src/applications/phame/mail/PhamePostReplyHandler.php
--- a/src/applications/phame/mail/PhamePostReplyHandler.php
+++ b/src/applications/phame/mail/PhamePostReplyHandler.php
@@ -14,8 +14,4 @@
return PhabricatorPhamePostPHIDType::TYPECONST;
}
- protected function shouldCreateCommentFromMailBody() {
- return false;
- }
-
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 9, 8:28 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6734957
Default Alt Text
D14454.id34948.diff (2 KB)
Attached To
Mode
D14454: Allow mail replies to Phame Posts
Attached
Detach File
Event Timeline
Log In to Comment