> ## Documentation Index
> Fetch the complete documentation index at: https://docs.holacati.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Audio messages

> Send and receive audio messages

<img className="block" src="https://mintcdn.com/cati/kJPYdW2ehSG3AiZq/images/audiomessages.png?fit=max&auto=format&n=kJPYdW2ehSG3AiZq&q=85&s=0b64e12910c71746c18ff3c6adfc9d06" alt="Audio messages preview" title={true} width="1405" height="1080" data-path="images/audiomessages.png" />

## Audio messages

### Record an audio message

*Work in progress*

### Listen to messages

#### All messages

The whole message list can be shown by calling the `activate_audio_messages` function

```javascript audiomessages.js theme={null}
function activate_audio_messages() {

    audio_messages_skeleton();

    // Fetch latest audio messages
    current_app_name = "audio_messages";
    const from_timestamp = new Date(0).toISOString();
    get_last_files("audio", from_timestamp);

}
```

#### From a specific user

It is also possible to fetch the messages that have been sent by a specific user, that is identified using the `user_id`.

```javascript audiomessages.js theme={null}
function get_audios_from_user(user_id) {

    audio_messages_skeleton();

    // Get audios from specific user_id from server
    current_app_name = "audio_messages";
    const from_timestamp = new Date(0).toISOString();
    get_last_files("audio", from_timestamp, user_id);

}
```
