diff --git a/src/applications/conpherence/editor/ConpherenceEditor.php b/src/applications/conpherence/editor/ConpherenceEditor.php --- a/src/applications/conpherence/editor/ConpherenceEditor.php +++ b/src/applications/conpherence/editor/ConpherenceEditor.php @@ -623,6 +623,19 @@ protected function shouldPublishFeedStory( PhabricatorLiskDAO $object, array $xactions) { + + foreach ($xactions as $xaction) { + switch ($xaction->getTransactionType()) { + case ConpherenceTransaction::TYPE_TITLE: + if ($xaction->getOldValue() == '') { + return true; + } + return false; + break; + case ConpherenceTransaction::TYPE_TOPIC: + return true; + } + } return false; } diff --git a/src/applications/conpherence/storage/ConpherenceTransaction.php b/src/applications/conpherence/storage/ConpherenceTransaction.php --- a/src/applications/conpherence/storage/ConpherenceTransaction.php +++ b/src/applications/conpherence/storage/ConpherenceTransaction.php @@ -123,6 +123,50 @@ return parent::getTitle(); } + public function getTitleForFeed() { + $author_phid = $this->getAuthorPHID(); + $object_phid = $this->getObjectPHID(); + + $old = $this->getOldValue(); + $new = $this->getNewValue(); + + $type = $this->getTransactionType(); + switch ($type) { + case self::TYPE_TITLE: + if ($old == '') { + return pht( + '%s created %s.', + $this->renderHandleLink($author_phid), + $this->renderHandleLink($object_phid)); + + } else { + return pht( + '%s renamed %s.', + $this->renderHandleLink($author_phid), + $this->renderHandleLink($object_phid)); + } + break; + case self::TYPE_TOPIC: + if ($new) { + $title = pht( + '%s set the topic of %s to "%s".', + $this->renderHandleLink($author_phid), + $this->renderHandleLink($object_phid), + $new); + } else if ($old) { + $title = pht( + '%s deleted the topic in "%s"', + $this->renderHandleLink($author_phid), + $this->renderHandleLink($object_phid)); + } + break; + } + + return parent::getTitleForFeed(); + } + + + private function getRoomTitle() { $author_phid = $this->getAuthorPHID();