File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,13 @@ public function handle(Event $event): void {
4949 }
5050 } elseif ($ event instanceof ShareDeletedEvent) {
5151 $ receiverId = $ event ->getShare ()->getSharedWith ();
52- $ this ->forEachSubNode (
53- $ event ->getShare ()->getNode (),
54- // Remove node from any album when the owner is $receiverId.
55- fn ($ node ) => $ this ->albumMapper ->removeFileWithOwner ($ node ->getId (), $ receiverId ),
56- );
52+ if ($ receiverId !== null ) { // null for public link shares
53+ $ this ->forEachSubNode (
54+ $ event ->getShare ()->getNode (),
55+ // Remove node from any album when the owner is $receiverId.
56+ fn ($ node ) => $ this ->albumMapper ->removeFileWithOwner ($ node ->getId (), $ receiverId ),
57+ );
58+ }
5759 } elseif ($ event instanceof UserRemovedEvent) {
5860 // Get all shared albums for this group:
5961 $ albums_group = $ this ->albumMapper ->getSharedAlbumsForCollaborator ($ event ->getGroup ()->getGID (), AlbumMapper::TYPE_GROUP );
You can’t perform that action at this time.
0 commit comments