<name>com.woltlab.wcf.likeableArticle.recentActivityEvent</name>
<definitionname>com.woltlab.wcf.user.recentActivityEvent</definitionname>
<classname>wcf\system\user\activity\event\LikeableArticleUserActivityEvent</classname>
+ <supportReactions>1</supportReactions>
</type>
<type>
<name>com.woltlab.wcf.articleComment.recentActivityEvent</name>
// update recent activity
if (UserActivityEventHandler::getInstance()->getObjectTypeID($likeable->getObjectType()->objectType.'.recentActivityEvent')) {
- if ($like->likeID) {
- UserActivityEventHandler::getInstance()->removeEvent($likeable->getObjectType()->objectType.'.recentActivityEvent', $likeable->getObjectID(), $user->userID);
- }
+ $objectType = ObjectTypeCache::getInstance()->getObjectTypeByName('com.woltlab.wcf.user.recentActivityEvent', $likeable->getObjectType()->objectType.'.recentActivityEvent');
- UserActivityEventHandler::getInstance()->fireEvent($likeable->getObjectType()->objectType.'.recentActivityEvent', $likeable->getObjectID(), $likeable->getLanguageID(), $user->userID, TIME_NOW, [
- 'reactionType' => $reaction
- ]);
+ if ($objectType->supportReactions) {
+ if ($like->likeID) {
+ UserActivityEventHandler::getInstance()->removeEvent($likeable->getObjectType()->objectType . '.recentActivityEvent', $likeable->getObjectID(), $user->userID);
+ }
+
+ UserActivityEventHandler::getInstance()->fireEvent($likeable->getObjectType()->objectType . '.recentActivityEvent', $likeable->getObjectID(), $likeable->getLanguageID(), $user->userID, TIME_NOW, ['reactionType' => $reaction]);
+ }
}
WCF::getDB()->commitTransaction();