Page MenuHomePhabricator

D16561.id39859.diff
No OneTemporary

D16561.id39859.diff

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,17 @@
protected function shouldPublishFeedStory(
PhabricatorLiskDAO $object,
array $xactions) {
+
+ foreach ($xactions as $xaction) {
+ switch ($xaction->getTransactionType()) {
+ case ConpherenceTransaction::TYPE_TITLE:
+ case ConpherenceTransaction::TYPE_TOPIC:
+ case ConpherenceTransaction::TYPE_PICTURE:
+ return true;
+ default:
+ return false;
+ }
+ }
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,55 @@
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 && $new) {
+ return pht(
+ '%s renamed %s from "%s" to "%s".',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid),
+ $old,
+ $new);
+ } else {
+ return pht(
+ '%s created the room "%s".',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid));
+ }
+ break;
+ break;
+ case self::TYPE_TOPIC:
+ if ($new) {
+ return pht(
+ '%s set the topic of %s to "%s".',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid),
+ $new);
+ } else if ($old) {
+ return pht(
+ '%s deleted the topic in "%s"',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid));
+ }
+ break;
+ case self::TYPE_PICTURE:
+ return pht(
+ '%s updated the room image for %s.',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid));
+ break;
+ }
+ return parent::getTitleForFeed();
+ }
+
private function getRoomTitle() {
$author_phid = $this->getAuthorPHID();

File Metadata

Mime Type
text/plain
Expires
Jul 17 2025, 4:06 PM (14 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8499195
Default Alt Text
D16561.id39859.diff (2 KB)

Event Timeline