Skip to content

Commit 523b18f

Browse files
authored
Merge pull request #14160 from nextcloud/backport/14129/stable33
[stable33] feat(admin): document contactsinteraction app
2 parents 0eaeff2 + d0eb975 commit 523b18f

2 files changed

Lines changed: 82 additions & 0 deletions

File tree

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
=====================
2+
Contacts Interaction
3+
=====================
4+
5+
The Contacts Interaction app automatically tracks which people a user has recently interacted with
6+
and provides this data as a read-only CardDAV address book called **Recently contacted**. This
7+
enables autocomplete suggestions in sharing dialogs, email composition, calendar invitations and
8+
other places that query the user's address books — even for people who are not saved as explicit
9+
contacts.
10+
11+
The app is shipped with Nextcloud and enabled by default. It can be disabled.
12+
13+
How interactions are tracked
14+
----------------------------
15+
16+
The app listens for ``ContactInteractedWithEvent`` events dispatched by other Nextcloud apps. The
17+
following apps dispatch this event:
18+
19+
* **File sharing**: When a user creates a share with another local user, an email address or a
20+
federated remote user.
21+
* **Calendar**: When a user shares a calendar with another user.
22+
* **Mail**: When a user sends an email.
23+
24+
Any app can integrate by dispatching a ``ContactInteractedWithEvent`` with at least one identifier:
25+
a Nextcloud user ID, an email address or a federated cloud ID.
26+
27+
When an interaction is recorded, the app first checks whether the contacted person already exists in
28+
one of the user's regular address books. If a match is found, no entry is created in the recently
29+
contacted address book since the person is already a known contact. Self-interactions (where the
30+
user interacts with themselves) are also ignored.
31+
32+
For new contacts, a minimal vCard is generated containing:
33+
34+
* ``FN`` (display name): Resolved from the Nextcloud user profile if the person is a local user,
35+
falling back to the email address or federated cloud ID.
36+
* ``EMAIL``: Included when an email address is known.
37+
* ``CLOUD``: Included when a federated cloud ID is known.
38+
* ``CATEGORIES``: Set to ``Recently contacted``, which allows the Contacts app to identify entries
39+
from this address book and offer users the option to copy them to a regular address book.
40+
41+
If the same person is contacted again, the existing entry's timestamp is updated rather than
42+
creating a duplicate.
43+
44+
The recently contacted address book
45+
------------------------------------
46+
47+
Each user's recently contacted address book is accessible via CardDAV at::
48+
49+
/remote.php/dav/addressbooks/users/{userId}/z-app-generated--contactsinteraction--recent/
50+
51+
The ``z-app-generated`` prefix ensures the address book sorts after user-created address books. Users
52+
cannot create their own address books with this reserved prefix.
53+
54+
The address book is **read-only** and **not shareable**. Users cannot create, modify or delete
55+
entries. Entries are only removed automatically by the cleanup job or when a user account is deleted.
56+
57+
The address book is visible in:
58+
59+
* **CardDAV clients**: Any client syncing with the user's Nextcloud (e.g., Thunderbird, macOS
60+
Contacts, DAVx5) will see the address book.
61+
* **Nextcloud Contacts**: The address book and its entries appear in the Contacts UI if the
62+
Contacts app is enabled. Contacts from this address book can be copied to a regular address book.
63+
* **Autocomplete**: Entries are available for recipient suggestions in sharing dialogs and other
64+
places across the Nextcloud web interface.
65+
66+
Data retention
67+
--------------
68+
69+
A background job runs every 24 hours and removes entries that have not been updated within the last
70+
7 days. Both the retention period and the cleanup interval are fixed and cannot be configured.
71+
72+
.. note::
73+
74+
The cleanup job depends on the Nextcloud background job system. Make sure cron is configured
75+
correctly for your instance. See :doc:`../configuration_server/background_jobs_configuration`.
76+
77+
User deletion
78+
-------------
79+
80+
When a user account is deleted, all of that user's recently contacted entries are automatically
81+
removed from the database.

admin_manual/groupware/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Groupware
88

99
calendar
1010
contacts
11+
contactsinteraction
1112
mail
1213
out_of_office
1314
troubleshooting

0 commit comments

Comments
 (0)