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 committed Mar 18, 2021
commit ca76bc866f74e025b3164f96bba16ddd98a053e2
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