@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Allow mail replies to Phame Posts

Summary: Adds mail reply support to Phame Posts.

Test Plan: Comment on a post, get mail.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9746

Differential Revision: https://secure.phabricator.com/D14454

authored by

Chad Little and committed by
chad
3747a354 2b5bb642

+30 -4
+2
src/__phutil_library_map__.php
··· 3280 3280 'PhamePostEditor' => 'applications/phame/editor/PhamePostEditor.php', 3281 3281 'PhamePostFramedController' => 'applications/phame/controller/post/PhamePostFramedController.php', 3282 3282 'PhamePostListController' => 'applications/phame/controller/post/PhamePostListController.php', 3283 + 'PhamePostMailReceiver' => 'applications/phame/mail/PhamePostMailReceiver.php', 3283 3284 'PhamePostNewController' => 'applications/phame/controller/post/PhamePostNewController.php', 3284 3285 'PhamePostNotLiveController' => 'applications/phame/controller/post/PhamePostNotLiveController.php', 3285 3286 'PhamePostPreviewController' => 'applications/phame/controller/post/PhamePostPreviewController.php', ··· 7561 7562 'PhamePostEditor' => 'PhabricatorApplicationTransactionEditor', 7562 7563 'PhamePostFramedController' => 'PhamePostController', 7563 7564 'PhamePostListController' => 'PhamePostController', 7565 + 'PhamePostMailReceiver' => 'PhabricatorObjectMailReceiver', 7564 7566 'PhamePostNewController' => 'PhamePostController', 7565 7567 'PhamePostNotLiveController' => 'PhamePostController', 7566 7568 'PhamePostPreviewController' => 'PhamePostController',
+28
src/applications/phame/mail/PhamePostMailReceiver.php
··· 1 + <?php 2 + 3 + final class PhamePostMailReceiver 4 + extends PhabricatorObjectMailReceiver { 5 + 6 + public function isEnabled() { 7 + return PhabricatorApplication::isClassInstalled( 8 + 'PhabricatorPhameApplication'); 9 + } 10 + 11 + protected function getObjectPattern() { 12 + return 'POST[1-9]\d*'; 13 + } 14 + 15 + protected function loadObject($pattern, PhabricatorUser $viewer) { 16 + $id = (int)substr($pattern, 4); 17 + 18 + return id(new PhamePostQuery()) 19 + ->setViewer($viewer) 20 + ->withIDs(array($id)) 21 + ->executeOne(); 22 + } 23 + 24 + protected function getTransactionReplyHandler() { 25 + return new PhamePostReplyHandler(); 26 + } 27 + 28 + }
-4
src/applications/phame/mail/PhamePostReplyHandler.php
··· 14 14 return PhabricatorPhamePostPHIDType::TYPECONST; 15 15 } 16 16 17 - protected function shouldCreateCommentFromMailBody() { 18 - return false; 19 - } 20 - 21 17 }