@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.

Transactions - make TYPE_COMMENT implementation optional

Summary: Ref T6403. Conpherence keeps track of comments for message counts so we needed some special attention there. Otherwise, straight-forward.

Test Plan: left a comment on a diff with inline comments. sent messages in conpherence successfully. verified unread count incremented correctly for sent messages for users.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6403

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

+15 -12
-2
src/applications/audit/editor/PhabricatorAuditEditor.php
··· 115 115 PhabricatorApplicationTransaction $xaction) { 116 116 117 117 switch ($xaction->getTransactionType()) { 118 - case PhabricatorTransactions::TYPE_COMMENT: 119 118 case PhabricatorAuditActionConstants::ACTION: 120 119 case PhabricatorAuditActionConstants::INLINE: 121 120 case PhabricatorAuditActionConstants::ADD_AUDITORS: ··· 131 130 PhabricatorApplicationTransaction $xaction) { 132 131 133 132 switch ($xaction->getTransactionType()) { 134 - case PhabricatorTransactions::TYPE_COMMENT: 135 133 case PhabricatorAuditActionConstants::ACTION: 136 134 case PhabricatorAuditTransaction::TYPE_COMMIT: 137 135 return;
-2
src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
··· 108 108 $object->setIsAllDay((int)$xaction->getNewValue()); 109 109 return; 110 110 case PhabricatorCalendarEventTransaction::TYPE_INVITE: 111 - case PhabricatorTransactions::TYPE_COMMENT: 112 111 case PhabricatorTransactions::TYPE_VIEW_POLICY: 113 112 case PhabricatorTransactions::TYPE_EDIT_POLICY: 114 113 return; ··· 149 148 } 150 149 $object->attachInvitees($invitees); 151 150 return; 152 - case PhabricatorTransactions::TYPE_COMMENT: 153 151 case PhabricatorTransactions::TYPE_VIEW_POLICY: 154 152 case PhabricatorTransactions::TYPE_EDIT_POLICY: 155 153 return;
+13 -3
src/applications/conpherence/editor/ConpherenceEditor.php
··· 247 247 248 248 $make_author_recent_participant = true; 249 249 switch ($xaction->getTransactionType()) { 250 - case PhabricatorTransactions::TYPE_COMMENT: 251 - $object->setMessageCount((int)$object->getMessageCount() + 1); 252 - break; 253 250 case ConpherenceTransactionType::TYPE_TITLE: 254 251 $object->setTitle($xaction->getNewValue()); 255 252 break; ··· 294 291 if ($make_author_recent_participant) { 295 292 $this->makeAuthorMostRecentParticipant($object, $xaction); 296 293 } 294 + } 295 + 296 + protected function applyBuiltinInternalTransaction( 297 + PhabricatorLiskDAO $object, 298 + PhabricatorApplicationTransaction $xaction) { 299 + 300 + switch ($xaction->getTransactionType()) { 301 + case PhabricatorTransactions::TYPE_COMMENT: 302 + $object->setMessageCount((int)$object->getMessageCount() + 1); 303 + break; 304 + } 305 + 306 + return parent::applyBuiltinInternalTransaction($object, $xaction); 297 307 } 298 308 299 309 private function makeAuthorMostRecentParticipant(
-2
src/applications/differential/editor/DifferentialTransactionEditor.php
··· 195 195 case PhabricatorTransactions::TYPE_EDIT_POLICY: 196 196 $object->setEditPolicy($xaction->getNewValue()); 197 197 return; 198 - case PhabricatorTransactions::TYPE_COMMENT: 199 198 case DifferentialTransaction::TYPE_INLINE: 200 199 return; 201 200 case DifferentialTransaction::TYPE_UPDATE: ··· 577 576 case PhabricatorTransactions::TYPE_VIEW_POLICY: 578 577 case PhabricatorTransactions::TYPE_EDIT_POLICY: 579 578 return; 580 - case PhabricatorTransactions::TYPE_COMMENT: 581 579 case DifferentialTransaction::TYPE_ACTION: 582 580 return; 583 581 case DifferentialTransaction::TYPE_INLINE:
-3
src/applications/paste/editor/PhabricatorPasteEditor.php
··· 88 88 case PhabricatorTransactions::TYPE_EDIT_POLICY: 89 89 $object->setEditPolicy($xaction->getNewValue()); 90 90 return; 91 - case PhabricatorTransactions::TYPE_COMMENT: 92 - return; 93 91 } 94 92 95 93 return parent::applyCustomInternalTransaction($object, $xaction); ··· 105 103 case PhabricatorPasteTransaction::TYPE_LANGUAGE: 106 104 case PhabricatorTransactions::TYPE_VIEW_POLICY: 107 105 case PhabricatorTransactions::TYPE_EDIT_POLICY: 108 - case PhabricatorTransactions::TYPE_COMMENT: 109 106 return; 110 107 } 111 108
+2
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 404 404 case PhabricatorTransactions::TYPE_SUBSCRIBERS: 405 405 case PhabricatorTransactions::TYPE_INLINESTATE: 406 406 case PhabricatorTransactions::TYPE_EDGE: 407 + case PhabricatorTransactions::TYPE_COMMENT: 407 408 return $this->applyBuiltinInternalTransaction($object, $xaction); 408 409 } 409 410 ··· 500 501 $field = $this->getCustomFieldForTransaction($object, $xaction); 501 502 return $field->applyApplicationTransactionExternalEffects($xaction); 502 503 case PhabricatorTransactions::TYPE_INLINESTATE: 504 + case PhabricatorTransactions::TYPE_COMMENT: 503 505 return $this->applyBuiltinExternalTransaction($object, $xaction); 504 506 } 505 507