mirror of
https://github.com/openvk/openvk
synced 2024-11-14 02:59:12 +03:00
Wall: Remove sending a notification when a comment is like that breaks the list of notifications
To fix broken notification lists for everyone, run this SQL query in the database with notifications: DELETE FROM `notifications` WHERE `originModelType` = 6;
This commit is contained in:
parent
325c4d23a1
commit
5beff8897c
1 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ class Post extends Postable
|
|||
];
|
||||
|
||||
if((sizeof(DB::i()->getContext()->table("likes")->where($searchData)) > 0) !== $liked) {
|
||||
if($this->getOwner(false)->getId() !== $user->getId() && !($this->getOwner() instanceof Club))
|
||||
if($this->getOwner(false)->getId() !== $user->getId() && !($this->getOwner() instanceof Club) && !$this instanceof Comment)
|
||||
(new LikeNotification($this->getOwner(false), $this, $user))->emit();
|
||||
|
||||
parent::setLike($liked, $user);
|
||||
|
@ -148,7 +148,7 @@ class Post extends Postable
|
|||
{
|
||||
$liked = parent::toggleLike($user);
|
||||
|
||||
if($this->getOwner(false)->getId() !== $user->getId() && !($this->getOwner() instanceof Club))
|
||||
if($this->getOwner(false)->getId() !== $user->getId() && !($this->getOwner() instanceof Club) && !$this instanceof Comment)
|
||||
(new LikeNotification($this->getOwner(false), $this, $user))->emit();
|
||||
|
||||
foreach($this->getChildren() as $attachment)
|
||||
|
|
Loading…
Reference in a new issue