# Chat Core

Chat Core is the code for instant messaging that is used by Thunderbird. It provides a number of functions and capabilities, including:

* [Communications protocols](/thunderbird-development/codebase-overview/chat/chat-core-protocols.md) - IRC, Matrix, XMPP (and XMPP-based protocols)
* [Message styles](/thunderbird-development/codebase-overview/chat/message-styles.md)
* Account configuration
* [Contacts storage](/thunderbird-development/codebase-overview/chat/contacts.md)
* Message logging
* [Emoticon (smileys) handling](broken://pages/-MWcejMPW-yA3myoicPl)

The Chat Core code lives in the chat/ directory of [comm-central](https://searchfox.org/comm-central/source/chat).

#### [Chat Core Protocols](/thunderbird-development/codebase-overview/chat/chat-core-protocols.md)

The Chat Core code used by Thunderbird has some abstractions to deal with the differences between protocols (e.g. IRC vs. XMPP).

#### [Contacts](/thunderbird-development/codebase-overview/chat/contacts.md)

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.

#### [Keyboard shortcuts](/thunderbird-development/codebase-overview/chat/keyboard-shortcuts.md)

This is a list of the available keyboard shortcuts with brief descriptions of what they do.

#### [Message Styles](/thunderbird-development/codebase-overview/chat/message-styles.md)

Chat Core uses a message style system based on HTML, JS and CSS that is very similar to the one created for [Adium](https://adium.im/). If you plan to create a message style, reading the Adium documentation on the topic may be helpful -- see this [tutorial](https://web.archive.org/web/20160408094746/https://trac.adium.im/wiki/CreatingMessageStyles/Tutorial) and this [reference sheet](https://web.archive.org/web/20160715205801/https://trac.adium.im/wiki/CreatingMessageStyles).

#### [Notifications](/thunderbird-development/codebase-overview/chat/notifications.md)

This is a page for documenting the notifications in Thunderbird. This is likely out of date. Notifications are grouped by interface you need to attach the observer to.


---

# 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.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.
