mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-09 14:21:02 +01:00
a7ebfc12c0
Summary: Begin converting Conpherence to ModularTransactions, this converts title, topic, and picture to use modular transactions. Participants seems hairy so I'll do that in another diff Test Plan: Create a room with a topic, change room name, topic. Add people, remove people. Set a room image. Unset topic. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D17668
29 lines
619 B
PHP
29 lines
619 B
PHP
<?php
|
|
|
|
final class ConpherenceThreadPictureTransaction
|
|
extends ConpherenceThreadTransactionType {
|
|
|
|
const TRANSACTIONTYPE = 'picture';
|
|
|
|
public function generateOldValue($object) {
|
|
return $object->getProfileImagePHID();
|
|
}
|
|
|
|
public function applyInternalEffects($object, $value) {
|
|
$object->setProfileImagePHID($value);
|
|
}
|
|
|
|
public function getTitle() {
|
|
return pht(
|
|
'%s updated the room image.',
|
|
$this->renderAuthor());
|
|
}
|
|
|
|
public function getTitleForFeed() {
|
|
return pht(
|
|
'%s updated the room image for %s.',
|
|
$this->renderAuthor(),
|
|
$this->renderObject());
|
|
}
|
|
|
|
}
|