Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix notifying own activities
$createStream was unused. This *should* be correct behaviour.

Signed-off-by: Thomas Citharel <[email protected]>
  • Loading branch information
tcitworld authored and backportbot[bot] committed Mar 19, 2021
commit f9df6ba5b131eb7c7692bf6daa24fba60a2f30e7
5 changes: 1 addition & 4 deletions lib/NotificationGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ public function sendNotificationForEvent(IEvent $event, int $activityId) {
$selfAction = $event->getAffectedUser() === $event->getAuthor();
$notifySetting = $this->userSettings->getUserSetting($event->getAffectedUser(), 'notify', $event->getType());

// User is not the author or wants to see their own actions
$createStream = !$selfAction || $this->userSettings->getUserSetting($event->getAffectedUser(), 'setting', 'self');

if (($notifySetting || true) && $event->getGenerateNotification()) {
if ($notifySetting && !$selfAction && $event->getGenerateNotification()) {
$this->notificationManager->notify($this->getNotificationForEvent($event, $activityId));
}
}
Expand Down