Discard share notification for non-existing groups

Group shares might exist even after a group got deleted.

This fix catches the situation and discards the notification for the
obsolete group.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Co-authored-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Vincent Petry 2021-12-15 14:25:39 +01:00
parent a47da9722d
commit 4559a46c8d
No known key found for this signature in database
GPG key ID: E055D6A4D513575C

View file

@ -192,7 +192,7 @@ class Notifier implements INotifier {
}
$group = $this->groupManager->get($share->getSharedWith());
if (!$group->inGroup($user)) {
if ($group === null || !$group->inGroup($user)) {
throw new AlreadyProcessedException();
}