Skip to content

[Bug]: Recently contacted stores the same local user twice when contacted via share (UID) and calendar (email) #61347

Open

Description

@ndo84bw

⚠️ This issue respects the following points: ⚠️

Bug description

If you have a user named "User2 user2@example.net" on your Nextcloud instance, and you share a file with User2 and invite them to an event, they will appear twice in the "Recently contacted" address book. From Share I get "UID and Name without email" and from Calendar I get "email without name"

Image

Steps to reproduce

  1. Create a NC user with name and email. Example "User2" with "user2@example.net"
  2. Enable: Admin -> Groupware -> "Enable System Address Book" (you need this for Step 4)
  3. Share a file with "User2"
  4. Create and save an event with "User2" as an attendee
  5. Check your "Recently contacted" List

Expected behavior

Since I interacted with the same instance user in both cases, I expect to see User2 only once in "Recently Contacted" with UID/Name/Email - not twice, each holding only part of the information

this requires:

  • When sharing files, save not only the UID and name but also the email address (if available)
  • When inviting users to appointments, don't just save the email address - also lookup and save the UID and name (if there is only one user with that email address)

Nextcloud Server version

35 (master)

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Enabled:
    - appstore: 2.0.0-dev.0
    - calendar: 6.5.0-dev.0
    - circles: 35.0.0-dev.0
    - cloud_federation_api: 2.0.0-dev.0
    - comments: 2.0.0-dev.0
    - contacts: 8.8.0-dev.0
    - contactsinteraction: 2.0.0-dev.0
    - dashboard: 8.0.0-dev.0
    - dav: 2.0.0-dev.0
    - federatedfilesharing: 2.0.0-dev.0
    - federation: 2.0.0-dev.0
    - files: 3.0.0-dev.0
    - files_reminders: 2.0.0-dev.0
    - files_sharing: 2.0.0-dev.0
    - files_trashbin: 2.0.0-dev.0
    - files_versions: 2.0.0-dev.0
    - lookup_server_connector: 2.0.0-dev.0
    - oauth2: 2.0.0-dev.0
    - profile: 2.0.0-dev.0
    - provisioning_api: 2.0.0-dev.0
    - settings: 2.0.0-dev.0
    - sharebymail: 2.0.0-dev.0
    - systemtags: 2.0.0-dev.0
    - theming: 3.0.0-dev.0
    - twofactor_backupcodes: 2.0.0-dev.0
    - updatenotification: 2.0.0-dev.0
    - user_status: 2.0.0-dev.0  
    - weather_status: 2.0.0-dev.0
    - webhook_listeners: 2.0.0-dev.0
    - workflowengine: 3.0.0-dev.0

Nextcloud Signing status

Nextcloud Logs

Additional info

I'm aware that this cannot be solved completely. There are users without an email address. Or multiple users sharing the same email address. But for a cleanly maintained NC instance with unique users, I still see value in it. The question is how much effort/risk is justified. As background info: entries are removed automatically after 7 days without renewed contact.

Questions for the maintainers:

  1. Just enriching the entry with the email address on the sharing path would probably already give us the improvement when, after sharing, the same user is invited to an event via email. Are you OK with this approach?

  2. For an event attendee, only the email address is known at save time. So we could try getByEmail(email), and if that returns exactly one result, then try findMatch with the uid or email. If a match exists, update the timestamp; if not, generate the contact with UID/Name/CloudID/email. Are you OK with this approach?

Note: #31606 was addressed by #41046, but only deduplicates against the user's personal address books. The cases here - same-instance users (system address book) and the UID-vs-email split - aren't covered.

Activity

  1. added theissue type on Jun 16, 2026
  2. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Jun 16, 2026
  3. moved this from To triage to Triaged in 🧑‍🤝‍🧑 Community triageon Aug 20, 2026
  4. ChristophWurst commented on Oct 15, 2026

    @ChristophWurst
    Member

    Probably related, an example from a prod instance:

    BEGIN:VCARD
    VERSION:3.0
    PRODID:-//Sabre//Sabre VObject 4.5.6//EN
    UID:sabre-vobject-3a171ce2-61d1-42eb-ad94-f2f4eca150da
    URI:e79eadd9-c02a-4d69-b26d-09d784ff29c5
    FN:John Doe
    CATEGORIES:Recently contacted
    END:VCARD
    BEGIN:VCARD
    VERSION:3.0
    PRODID:-//Sabre//Sabre VObject 4.5.6//EN
    UID:sabre-vobject-a0aa2c63-208f-4078-b7a8-b9ac3e2f1efe
    URI:babed425-c67c-4789-925f-7e8762fd1adb
    FN:john.doe@acme.org
    CATEGORIES:Recently contacted
    EMAIL:johne.doe@acme.org
    END:VCARD

    Decision: these duplicates have to be prevented. Additionally we must not create a recently contacted entry for a contact that exist in any address book visible to the user. So if the system address book is shown and there is a match for John, it shouldn't create the contact.

  5. moved this to 🏗️ At engineering in 🖍 Design teamon Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions