Skip to content

Conversation

@tcitworld
Copy link
Member

@tcitworld tcitworld commented Jul 13, 2023

This allows simple users to opt-out of the contacts interaction addressbook even if admins have the app installed.

Similar to how the birthday calendar works, the functionnality can be toggled in the user's settings or by doing a DELETE on the addressbook.

A new contacts personal section has been added to contain this new setting.

TODO

  • moar tests

Checklist

*
* @param Server $server
*/
public function initialize(Server $server) {

Check notice

Code scanning / Psalm

MissingReturnType

Method OCA\ContactsInteraction\DAV\Plugin::initialize does not have a return type, expecting void
@skjnldsv skjnldsv mentioned this pull request Nov 1, 2023
This was referenced Nov 6, 2023
This was referenced Nov 14, 2023
@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
@HLFH
Copy link
Contributor

HLFH commented Feb 1, 2024

@tcitworld But what if I like this addressbook, and I only need to delete one contact from this addressbook. Let's say I have sent an email to a non-existent address, I get a bounce-back NDR email, and the non-existent contact goes into the "Recently contacted" addressbook, but because the email address is invalid, I want to delete it, while still enjoying the "Recently contacted" addressbook. This PR seems to solve only 50% of the current issue we have with this addressbook. I think deleting/disabling the whole addressbook does not address the described issue I have.

@tcitworld
Copy link
Member Author

@HLFH We will keep the issue opened for this specific aspect

@tcitworld tcitworld force-pushed the contctsinteraction-usersetting branch from c43c995 to b6710f4 Compare February 1, 2024 17:36
@tcitworld
Copy link
Member Author

Rebased

Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting the address book from the Contacts app didn't work. The DELETE request itself worked and the address book vanishes until the next page reload. It will still contain all of its former contacts after the page reload.

Disabling it via the personal settings works. However, the address book is still shown in the Contacts settings modal (with 0 contacts and 0 groups) afterwards.

@tcitworld tcitworld added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Feb 13, 2024
@Altahrim Altahrim mentioned this pull request Mar 12, 2024
@tcitworld tcitworld added the 3. to review Waiting for reviews label Jun 23, 2024
@tcitworld
Copy link
Member Author

Deleting the address book from the Contacts app didn't work. The DELETE request itself worked and the address book vanishes until the next page reload. It will still contain all of its former contacts after the page reload.
Disabling it via the personal settings works. However, the address book is still shown in the Contacts settings modal (with 0 contacts and 0 groups) afterwards.

Fixed this.

*/
class Plugin extends ServerPlugin {

protected Server $server;

Check notice

Code scanning / Psalm

PropertyNotSetInConstructor

Property OCA\ContactsInteraction\DAV\Plugin::$server is not defined in constructor of OCA\ContactsInteraction\DAV\Plugin or in any methods called in the constructor
@tcitworld tcitworld force-pushed the contctsinteraction-usersetting branch from 529d2d9 to fd59640 Compare June 26, 2024 14:50
return;
}

$enabled = $event->getConfigValue() === 'yes';

Check notice

Code scanning / Psalm

PossiblyUndefinedMethod

Method OCP\Config\BeforePreferenceDeletedEvent::getConfigValue does not exist
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed 🙈

This was referenced Jul 30, 2024
This was referenced Aug 5, 2024
@skjnldsv skjnldsv mentioned this pull request Aug 13, 2024
@skjnldsv skjnldsv closed this Aug 14, 2024
@skjnldsv skjnldsv removed this from the Nextcloud 30 milestone Aug 14, 2024
@tcitworld tcitworld reopened this Aug 26, 2024
…n addressbook

This allows simple users to opt-out of the contacts interaction
addressbook even if admins have the app installed.

Similar to how the birthday calendar works, the functionnality can be
toggled in the user's settings or by doing a DELETE on the addressbook.

A new contacts personal section has been added to contain this new
setting.

Signed-off-by: Thomas Citharel <[email protected]>
@skjnldsv skjnldsv force-pushed the contctsinteraction-usersetting branch from fd59640 to d46271b Compare August 27, 2024 08:54
@skjnldsv skjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Aug 27, 2024
@skjnldsv skjnldsv added this to the Nextcloud 32 milestone Jan 30, 2025
This was referenced Aug 22, 2025
This was referenced Sep 2, 2025
This was referenced Sep 25, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress feature: carddav Related to CardDAV internals feature: contacts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show/hide "recently contacted"

7 participants