From: Matthias Schmidt Date: Thu, 21 May 2020 13:55:58 +0000 (+0200) Subject: Fix stacking of article reactions X-Git-Tag: 5.3.0_Alpha_1~286 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dbde1b1b477e3db37363dc4ebc98826c927b8258;p=GitHub%2FWoltLab%2FWCF.git Fix stacking of article reactions See #3269 --- diff --git a/wcfsetup/install/files/lib/data/article/LikeableArticle.class.php b/wcfsetup/install/files/lib/data/article/LikeableArticle.class.php index 5b6f0ea149..c0be84f513 100644 --- a/wcfsetup/install/files/lib/data/article/LikeableArticle.class.php +++ b/wcfsetup/install/files/lib/data/article/LikeableArticle.class.php @@ -81,7 +81,8 @@ class LikeableArticle extends AbstractLikeObject implements IReactionObject { 'like', 'com.woltlab.wcf.likeableArticle.notification', $notificationObject, - [$this->getDecoratedObject()->userID] + [$this->getDecoratedObject()->userID], + ['objectID' => $this->getDecoratedObject()->entryID] ); } } diff --git a/wcfsetup/install/files/lib/system/user/notification/event/ArticleLikeUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/ArticleLikeUserNotificationEvent.class.php index 85644c1d7c..7b31e084ed 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/ArticleLikeUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/ArticleLikeUserNotificationEvent.class.php @@ -105,6 +105,14 @@ class ArticleLikeUserNotificationEvent extends AbstractSharedUserNotificationEve return false; } + /** @noinspection PhpMissingParentCallCommonInspection */ + /** + * @inheritDoc + */ + public function getEventHash() { + return sha1($this->eventID . '-' . $this->additionalData['objectID']); + } + /** @noinspection PhpMissingParentCallCommonInspection */ /** * @inheritDoc