ikieEngineeringGet started
All posts

CalendarPrivacyGoogle People APIiOS

Names instead of emails: an attendee list people can read

A meeting's attendee list full of email addresses doesn't tell you at a glance who's coming. This is how ikie looks at your own labels, people you know on ikie, Google contacts and device contacts in turn, without letting anyone probe a stranger's name.

한국어

Open an event and there's a list of attendees. But attendees that come from an external calendar often have only an email, no name. When the list is a column of kim.j@company.com and pm-team@…, you have to read addresses to work out who's coming. ikie spent eleven PRs over a week making this list readable.

First: organizer, me, everyone else

It started with replies (#433). Attendees are stored in a table, and when you answer for your own row (yes, no, maybe) it goes back to Google. The next day (#573) we fixed the order. The organizer goes first, then you, then everyone else in the order received. You can find your own row even in a long list, and it carries a "Me" badge. iOS got the same order and a "Me" capsule (#574).

Names come from five layers

From #883 on, ikie shows names instead of emails. One email can have several candidate names, so we decided which one wins.

  1. My labelperson table

    A name I gave by tapping an attendee row. Only I see it, and it's never sent to external calendars.

  2. Someone I know on ikieprofile name

    If the person using that email is me, a friend, or someone in a shared group, the name and photo they chose.

  3. Google contactscontact_name table

    The name saved in my Google contacts, company directory or other contacts.

  4. Name from the external calendardisplayName · CN

    The name the inviting calendar put in the event.

  5. Emailemail

    The address itself, when there's no name at all.

The first one that exists, from the top, is shown. The email remains only when there is nothing else.

The order has reasons. My label is my own intent, so it comes first. Someone on ikie chose their own name, and a contact is a name I saved. A name from the external calendar was written by the inviting side and is sometimes a company system name or an alias, so it comes after those.

The server does the choosing. So the web app, the iOS app and the user's connected Claude (MCP) all get the same names. The data layer reads the facts in one SQL query, and one pure function picks.

/** Puts the found names on. A row with the viewer's own address is me (self) */
export function namedAttendees(list: AttendeeInfo[], found: AttendeeName[], viewer?: string): AttendeeInfo[] {
  if (!found.length) return list;
  const by = new Map(found.map((f) => [f.email, f]));
  return list.map((a) => {
    const f = !a.circleId && a.email ? by.get(cleanEmail(a.email) ?? "") : undefined;
    if (!f) return a;
    const person = { ...(f.userId ? { image: f.image } : {}), ...(viewer && f.userId === viewer ? { self: true } : {}) };
    if (f.label) return { ...a, ...person, name: f.label, named: "mine" as const };
    if (f.name) return { ...a, ...person, name: f.name, named: "ikie" as const };
    return f.contact ? { ...a, ...person, name: f.contact } : { ...a, ...person };
  });
}

Names aren't stored. The attendee row keeps what the external calendar sent, and every time it's shown the name is picked from the facts (my labels, people I know, contacts). So when a friend changes their profile name or I delete a label, the next open shows it.

Don't store the name you show; pick it when it's shown. Keep each fact in one place, and let one calculation decide which comes first.

No probing a stranger's name

Letting anyone look up "the ikie person who uses this email" would be a problem. Just by adding an arbitrary email to an event, you could learn whether that address uses ikie, and what their name and face are. So ikie people are found only among people you already know: you, accepted friends, and groups you both joined. Even in a group, blocked pairs are left out.

Only verified addresses count as that person's email: the signup email, the Google or Outlook sign-in email, and addresses a CalDAV server reported as theirs. Addresses someone typed in by hand aren't verified, so they're not used. Otherwise you could claim someone else's address and have your name appear on invitations sent to them.

When finding people by email, look only among people you already know, and only at verified addresses. Even a name is information to a stranger.

Who is "me"?

The next bug was the "Me" badge (#890). In a Google event, self doesn't mean "the viewer". It means "the owner of this calendar". So when you opened a shared or subscribed calendar, the owner's row was marked "Me".

Now, in someone else's calendar, the external self is cleared, and a row is marked as you only when its email is one of your verified addresses. One consequence is that events in someone else's calendar have no reply buttons. That row belongs to the calendar's owner, and you shouldn't answer for them.

Google contacts: names and emails only, asked once

People you haven't labelled are often already in your Google contacts. #891 fetches names from the Google People API. There are only three read endpoints, so we call them with fetch instead of adding an SDK.

SourceEndpointWhat
My contactspeople/me/connectionsPeople I saved
Company directorypeople:listDirectoryPeopleColleagues on a Workspace account
Other contactsotherContactsPeople Gmail remembers from mail

The three sources are fetched in that order, and for the same email the first name wins. Only names and emails are requested, 1000 per page and up to ten pages per source. The company directory exists only for Workspace accounts, so Google refuses it for personal accounts. That's treated as an empty list, not a failure. Everything is refetched once a day and replaced as a whole.

At first, contacts were a separate connection in settings (#908). #919 removed it. The names belong to people outside ikie, so there's nothing to manage, and asking once for the same Google account beats asking twice. Now the contacts read permission is asked together with connecting Google Calendar. If you untick contacts on the consent screen, the calendar still works, names are skipped, and ikie checks again a day later. The names are visible only to you, and they're deleted as soon as you disconnect that Google Calendar or delete your account. The privacy policy says this in six languages.

iPhone contacts never leave the iPhone

iOS has device contacts (#884). Permission is asked only for rows the server couldn't name, and only when you tap "Show names from Contacts". The lookup is by email (CNContactStore with an email predicate), the names stay in memory while the screen is drawn, and they're never sent to the server. The permission prompt says so: "Nothing leaves this iPhone."

The same PR added photos and an email line to iOS attendee rows, and lets you tap a row to label it.

An organizer that isn't a person

The last one was an odd screen spotted in use (#926). Google Calendar showed two attendees, but ikie had one more row: "ikie demo · You · Organizer".

Events created in a secondary calendar (a second calendar inside your account) list the calendar's address (…@group.calendar.google.com) as the organizer, not a person. ikie adds the organizer to the front when they aren't in the attendee list, and it added this address as a person too. Like Google Calendar, an organizer whose address is a calendar (group, import) is now skipped, and the rows already stored were removed by a migration (#927).

  1. #433Attendee table, my reply goes to Google
  2. #573–574Organizer → me → the rest, a 'Me' badge
  3. #883–884Five layers of names, known people only, iOS photos and device contacts
  4. #890Decide who 'me' is in someone else's calendar
  5. #891, #919Google contacts, asked once when connecting the calendar
  6. #926–927Skip organizers that are calendar addresses
  7. NextContact names for everyone after Google's review

What we learned

Showing one name brought questions with it: whose name wins, may I know this person, and who am I. Instead of answering them per screen, we put the answers in one server calculation and one SQL query. The web, iOS and Claude see the same list, and when a question changes there's one place to change.

The ikie teamikie is a calendar for your events and to-dos in one place. Here we write about the problems we run into while building it, and how we solve them.