diff --git a/wcfsetup/install/files/lib/system/reaction/ReactionHandler.class.php b/wcfsetup/install/files/lib/system/reaction/ReactionHandler.class.php index b63ff792067..b11da7a3754 100644 --- a/wcfsetup/install/files/lib/system/reaction/ReactionHandler.class.php +++ b/wcfsetup/install/files/lib/system/reaction/ReactionHandler.class.php @@ -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, + ] ); } } diff --git a/wcfsetup/install/files/lib/system/user/activity/event/LikeableArticleUserActivityEvent.class.php b/wcfsetup/install/files/lib/system/user/activity/event/LikeableArticleUserActivityEvent.class.php index f036debbf63..45e84d83dfc 100644 --- a/wcfsetup/install/files/lib/system/user/activity/event/LikeableArticleUserActivityEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/activity/event/LikeableArticleUserActivityEvent.class.php @@ -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; @@ -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);