Methods
GetNicknames | (au: Contacts) | → | a{us}: Nicknames | |
RequestNickname | (u: Contact) | → | s: Nickname | |
SetNickname | (s: Nickname) | → | nothing |
Signals
NicknameUpdated | (u: Contact, s: Nickname) |
Contact Attributes
org.freedesktop.Telepathy.Connection.Interface.Nicknames.DRAFT/nickname | s |
Types
Nickname_Map | Mapping | a{us} |
Description
This interface represents connections where contacts have a nickname which they can set at will, either when the account is created or at any time.
User interfaces SHOULD NOT display the nickname as a contact's only identification, since it is chosen by the contact and could be set to a misleading value, for instance by an attacker seeking to masquerade as someone known to the user. Displaying the contact's self-chosen unique identifier (e.g. JID) is helpful, but it is not a complete solution for this, due to the existence of homograph attacks. See XEP-0165 "Best Practices to Discourage JID Mimicking" and An Introduction to Petname Systems for further discussion on this topic.
In Telepathy, the JID or equivalent unique identifier is the string form of a Contact_Handle, the nickname is available via this interface, and the "pet name" (if stored on the server at all) is available via the forthcoming Connection.ContactList interface. User interfaces MAY store a "pet name" locally; this is necessary if they are to support protocols with no server-stored contact list, like SIP.
The Aliasing interface mixes the concept of a name chosen by the contact with the concept of a name chosen by the local user. This means that compliance with XEP-0165 is impossible. In addition, if the locally-chosen alias takes precedence over the remotely-chosen nickname (as it usually should), it is impossible to see changes to the remotely-chosen nickname after a locally-chosen alias has been set.
See freedesktop.org bug 14540 for more context.
Methods
GetNicknames (au: Contacts) → a{us}: Nicknames
Parameters
- Contacts — au (Contact_Handle_List)
Returns
- Nicknames — a{us} (Nickname_Map)
Possible Errors
- Disconnected
- Invalid Handle
RequestNickname (u: Contact) → s: Nickname
Parameters
- Contact — u (Contact_Handle)
Returns
- Nickname — s
Return the current nickname of the given contact. If necessary, make a request to the server for up-to-date information, and wait for a reply.
This method is appropriate for use in a "Contact Information..." dialog; it can be used to show progress information (while waiting for the method to return), and can distinguish between various error conditions.
This method is also appropriate for detection of whether a locally-configured nickname should be set on a server.
Possible Errors
- Disconnected
- Network Error
- Invalid Handle
- Permission Denied
SetNickname (s: Nickname) → nothing
Parameters
- Nickname — s
Possible Errors
- Disconnected
- Not Implemented
- Permission Denied
Signals
NicknameUpdated (u: Contact, s: Nickname)
Parameters
- Contact — u (Contact_Handle)
- Nickname — s
Contact Attributes
org.freedesktop.Telepathy.Connection.Interface.Nicknames.DRAFT/nickname — s
The same string that would be returned by GetNicknames. If omitted from the result of GetContactAttributes, this indicates that no nickname is known; user interfaces SHOULD be prepared to cope with this, for instance by displaying the contact's identifier instead.
Types
Nickname_Map — a{us}
- Handle — u (Contact_Handle)
- Nickname — s