Using the contacts Command Set

The `contacts` command set is used to manage the user's contacts catalogue.

The contacts catalogue plays an important role in Mesh messaging as it is used to determine the security policy for sending outbound messages and is one of the sources used to perform access control (i.e. spam filtering) on inbound messages.

Although the `meshman` tool is capable of adding, deleting and retrieving contact entries, it is intended to serve as a component to be used to build user interfaces rather than a tool designed for daily use.

Adding contacts

The `contact add` command adds a contact entry to a catalog from a file.

Alice> contact add email
ERROR - Could not find file 'C:\Users\hallam\Test\WorkingDirectory\email'.

The file carol-contact.json contains Carol's contact information in JSON format:

[Carol's contact information]

The `/self` option is used to mark the contact as being the user's own contact details:

Alice> contact self email
ERROR - The feature has not been implemented

Contacts may also be added by accepting contact request messages using the `message accept` command:

Alice> message accept tbs
ERROR - The specified message could not be found.

Finding contacts

The `contact get` command retreives a contact by the contact's email address or label:

Alice> contact get

Listing contacts

A complete list of contacts is obtained using the `contact list` command:

Alice> contact list

Deleting contacts

Contact entries may be deleted using the `contact delete` command:

Alice> contact delete
ERROR - The entry could not be found in the store.

Adding devices

Devices are given authorization to access the contacts catalog using the `device auth` command:

% ConsoleExample (Examples.ContactAuth);

The newly authorized device can now access the contacts catalog:

% ConsoleExample (Examples.ContactList2);