# Contacts

Contacts are at the heart of instant messaging, and thus the Chat Core has a way to abstract to a "person" (represented by an [`imIContact`](https://searchfox.org/comm-central/source/chat/components/public/imIContactsService.idl) instance), which might connect to multiple networks, etc.

{% hint style="warning" %}
*Draft: This page is not complete.*
{% endhint %}

### Display Name <a href="#display_name" id="display_name"></a>

The display name used in the buddy list window or in conversations can come from several sources, by precedence order:

* User-set alias, stored locally (set when the user renames someone from Thunderbird)
* Server-stored alias (some protocol store the aliases online)
* Display name / Friendly name (set by the remote contact, stored on the server)
* Username, the unique identifier of the buddy for this protocol. Can be numbers (e.g. ICQ, QQ), email addresses (e.g. MSN, XMPP) or some other string.

Possible storage locations:

* mozStorage (the file blist.sqlite)
* chat core (cached copy)
* server read/write (server-stored alias)
* server read only (display names)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.thunderbird.net/thunderbird-development/codebase-overview/chat/contacts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
