Hiding share recipients list

We’re using nextcloud in a large system with lots of users who aren’t supposed to see each other. We sent a message to users using a shared file because we don’t have (or want) the email addresses of all users. We instantly got the feedback that we had now divulged the username of all users who got the file, to all users who got the file.

To remedy this, I was able to masque the users by adding a primary case to an if statement in ShareAPIController.php around line 201 like this:

    if ($share->getShareOwner() === 'admin') {
		// simply do not tell who admin shares stuff with
	} else if ($share->getShareType() === Share::SHARE_TYPE_USER) {
		$sharedWith = $this->userManager->get($share->getSharedWith());
		$result['share_with'] = $share->getSharedWith();
		$result['share_with_displayname'] = $sharedWith !== null ? $sharedWith->getDisplayName() : $share->getSharedWith();
	} else if ($share->getShareType() === Share::SHARE_TYPE_GROUP) {
		$group = $this->groupManager->get($share->getSharedWith());
		$result['share_with'] = $share->getSharedWith();
		$result['share_with_displayname'] = $group !== null ? $group->getDisplayName() : $share->getSharedWith();
	} else if ($share->getShareType() === Share::SHARE_TYPE_LINK) {
        [...]

It works, but it’s not pretty. Each sharee still has a bullet in the list, like this:
04

Can anyone help shed some light on how I could not show that list at all? I’m a bit too old-school to grasp the handlebars without assistance.