Skip to content

Commit

Permalink
Don't serialize reaction
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyperghost committed Dec 18, 2023
1 parent 20bca2a commit 690741e
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 690741e

Please sign in to comment.