Page MenuHomePhabricator

D14454.diff
No OneTemporary

D14454.diff

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

Mime Type
text/plain
Expires
Tue, Nov 19, 11:59 PM (17 h, 5 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6734957
Default Alt Text
D14454.diff (2 KB)

Event Timeline