1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Return more transaction types in Conpherence notification menu

Summary: Unclear these are worth sending, but mostly seems useful. Returns `getTitle` for the transaction if it's not a message. Fixes T10683

Test Plan: Leave rooms, change names, add pictures.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10683

Differential Revision: https://secure.phabricator.com/D16658
This commit is contained in:
Chad Little 2016-10-03 13:21:06 -07:00
parent 75fe750ee3
commit 60ce989247

View file

@ -284,11 +284,18 @@ final class ConpherenceThread extends ConpherenceDAO
$message_title = null;
if ($subtitle_mode == 'message') {
$message_transaction = null;
$action_transaction = null;
foreach ($transactions as $transaction) {
switch ($transaction->getTransactionType()) {
case PhabricatorTransactions::TYPE_COMMENT:
$message_transaction = $transaction;
break 2;
break;
case ConpherenceTransaction::TYPE_TITLE:
case ConpherenceTransaction::TYPE_TOPIC:
case ConpherenceTransaction::TYPE_PICTURE:
case ConpherenceTransaction::TYPE_PARTICIPANTS:
$action_transaction = $transaction;
break;
default:
break;
}
@ -303,6 +310,11 @@ final class ConpherenceThread extends ConpherenceDAO
->truncateString(
$message_transaction->getComment()->getContent()));
}
if ($action_transaction) {
$message_title = id(clone $action_transaction)
->setRenderingTarget(PhabricatorApplicationTransaction::TARGET_TEXT)
->getTitle();
}
}
switch ($subtitle_mode) {
case 'recent':