Skip to content

Question about contacts format #9

@jonlachmann

Description

@jonlachmann

Hi,

First off, nice project! I am building an email server that will be open source, and I just started adding JMAP support, and having this project to test against has been very useful!

This might be a bit premature, as it is not even merged yet, but I have a question about the contacts format. I thought I would ask to be sure that I am reading the spec correctly.

In the fork by @luna-dj there is support for contacts, but when I try it against my implementation, it complains about the formatting of the request.

Looking here: https://github.com/luna-dj/jmap-webmail/blob/6b1f2582728cd6b97636dfb8584b6ef7da5c491c/test-create-contact.js#L132, we see that the emails of a contact is specified as

emails: {
        'email-0': {
          address: 'test@example.com',
          contexts: ['personal']
        }
      }

but if I look at RFC 9610 in the example in 4.1 I see

"emails": {
           "0": {
             "contexts": {
               "private": true
             },
             "address": "joe.bloggs@example.com"
           }
         }

note the difference in contexts where there is a boolean attached to each value in the RFC. This is also true for RFC 9553.

Is it correct that there is a mistake in the code? Or am I reading the RFC's wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions