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 committed by backportbot[bot]
parent d750eb1da8
commit 3b5dd77275

View file

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