namespace wcf\data\comment;
use wcf\data\like\object\AbstractLikeObject;
use wcf\data\like\Like;
+use wcf\data\reaction\object\IReactionObject;
use wcf\system\comment\CommentHandler;
use wcf\system\user\notification\object\LikeUserNotificationObject;
use wcf\system\user\notification\UserNotificationHandler;
* @method Comment getDecoratedObject()
* @mixin Comment
*/
-class LikeableComment extends AbstractLikeObject {
+class LikeableComment extends AbstractLikeObject implements IReactionObject {
/**
* @inheritDoc
*/
*/
public function sendNotification(Like $like) {
$objectType = CommentHandler::getInstance()->getObjectType($this->getDecoratedObject()->objectTypeID);
- if (UserNotificationHandler::getInstance()->getObjectTypeID($objectType->objectType.'.like.notification')) {
+ if (UserNotificationHandler::getInstance()->getObjectTypeID($objectType->objectType.'.like.notification') && UserNotificationHandler::getInstance()->getObjectTypeProcessor($objectType->objectType.'.like.notification')->supportReactions) {
if ($this->userID != WCF::getUser()->userID) {
$notificationObject = new LikeUserNotificationObject($like);
UserNotificationHandler::getInstance()->fireEvent(