Skip to content
Snippets Groups Projects
Commit a1f07277 authored by Emmanuel Lepage Vallée's avatar Emmanuel Lepage Vallée Committed by Nicolas Jager
Browse files

contactMethod: Prevent duplication of registered name CMs


**WARNING** This makes the setRegisteredName method private and
thus break the API. That method could not stay public as this
would potentially corrupt the indexes.

This patch adds the registered names to the global name
directory. If `::getNumber()` is used with a known registered
name, no new CM are created.

This patch fixes the "most common" case, but doesn't implement the
following corner cases:

 * If the registered name is already part of the directory, but
   not fully linked to an account and/or RingId.
 * If there is multiple name service

For the multiple name service, the
`NameDirectory::registeredNameFound` signal will need to use full
URIs for the names (ring:foo@ns.ring.cx). This is out of this
patch scope and will have side effects that needs to be addressed
in each clients.

Change-Id: If06561dc4cb56453cc77092f4c30c633e852b7fd
Reviewed-by: default avatarNicolas Jäger <nicolas.jager@savoirfairelinux.com>
parent 44dcaf01
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment