Make user email address private in the talk app

Hello all!

I have a next cloud server (20.0.5-stable) and when users sign up their email is visible in the talk app. I want to make it automatically private or at least be able to make that information private manually.

(As a temporary work around)I have installed css editor and used
}
#contactsmenu {
display: none;
}

This disables the contact view and makes it harder, but you can still click on the talk app, search for a user and it shows their email.

From my understanding, there should be a config.php file that I can edit to change this but I can’t seem to be able to navigate to the directory in shell. I’m running NextCloud in a TrueNas Core jail, so its probably different than a typical Linux install.

A user stated in another thread that

modify /var/www/nextcloud/lib/private/Contacts/ContactsMenu/ContactsStore.php on line 268
$entry->addEMailAddress($email);
to
// $entry->addEMailAddress($email);

This should fix the public email problem, but as previously mentioned I can’t seem to find that directory.

Thank you for taking the time to read, any help would be greatly appreciated!

Hey Thomas,

I had a similar concern due to privacy reasons. I wanted my users to communicate via Talk, but not to see each others mail-addresses.

I solved this by setting the content of ‘public function process’ in ‘EMailProvider.php’ (/lib/private/Contacts/ContactsMenu/Providers/) as comment. (approx. last 10 lines of the code)

By doing this, all other actions still work fine, including the ContactsMenu and Talk App, but neither the function of mailing each other is shown, nor the mail-adresses themselves.

Hoping this will work for you, too!
Florian

public function process(IEntry $entry) {
/* $iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath(‘core’, ‘actions/mail.svg’));
* foreach ($entry->getEMailAddresses() as $address) {
* if (empty($address)) {
* // Skip
* continue;
* }
* $action = $this->actionFactory->newEMailAction($iconUrl, $address, $address);
* $entry->addAction($action);
* } */
}