1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00

Fix PonderQuestionCreateMailReceiver accessing non-existing PonderQuestionTransaction constants

Summary:
The transaction types `TYPE_TITLE` and `TYPE_CONTENT` were removed from `PonderQuestionTransaction` in rPdff028c4907dd1959859733ea0d947f244559e7f.
Thus update `PonderQuestionCreateMailReceiver` to use the corresponding modular transactions `PonderQuestionTitleTransaction` and `PonderQuestionContentTransaction` instead.

Test Plan: Carefully read the code, grep the code base, use the test case in D25656#18162.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25656
This commit is contained in:
Andre Klapper 2024-05-17 11:20:07 +02:00
parent b8a03bc145
commit 8c82117878

View file

@ -20,11 +20,11 @@ final class PonderQuestionCreateMailReceiver
$xactions = array();
$xactions[] = id(new PonderQuestionTransaction())
->setTransactionType(PonderQuestionTransaction::TYPE_TITLE)
->setTransactionType(PonderQuestionTitleTransaction::TRANSACTIONTYPE)
->setNewValue($title);
$xactions[] = id(new PonderQuestionTransaction())
->setTransactionType(PonderQuestionTransaction::TYPE_CONTENT)
->setTransactionType(PonderQuestionContentTransaction::TRANSACTIONTYPE)
->setNewValue($mail->getCleanTextBody());
$question = PonderQuestion::initializeNewQuestion($author);