Skip to content

Commit

Permalink
Merge pull request #5733 from WoltLab/no-serialize-reaction
Browse files Browse the repository at this point in the history
Don't serialize reaction
  • Loading branch information
Cyperghost authored Dec 18, 2023
2 parents 7ea0236 + 690741e commit a275a7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,11 @@ public function react(ILikeObject $likeable, User $user, $reactionTypeID, $time
$likeable->getLanguageID(),
$user->userID,
TIME_NOW,
['reactionType' => $reaction]
[
'reactionTypeID' => $reaction->reactionTypeID,
/* @deprecated 6.1 use `reactionTypeID` */
'reactionType' => $reaction,
]
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace wcf\system\user\activity\event;

use wcf\data\article\ViewableArticleList;
use wcf\system\reaction\ReactionHandler;
use wcf\system\SingletonFactory;
use wcf\system\WCF;

Expand Down Expand Up @@ -50,7 +51,9 @@ public function prepare(array $events)
// short output
$text = WCF::getLanguage()->getDynamicVariable('wcf.article.recentActivity.likedArticle', [
'article' => $article,
'reactionType' => $event->reactionType,
'reactionType' => ReactionHandler::getInstance()->getReactionTypeByID(
$event->reactionTypeID ?? $event->reactionType->reactionTypeID
),
]);
$event->setTitle($text);

Expand Down

0 comments on commit a275a7c

Please sign in to comment.