In the apps. New direct messages and groups are encrypted when their creator has encryption set up; older plaintext conversations stay as they are until upgraded. Direct messages and groups across servers require encryption. Each encrypted conversation is an MLS group, with devices as members. A sending device encrypts the content; recipient devices decrypt it. Servers order and deliver ciphertext without holding the conversation's keys.
Channels are deliberately readable by their server, for shared history, server search and workflows. Encryption doesn't hide metadata such as membership and message timing. Letting a plugin or the built-in agent read decrypted content gives that tool access to it.
Read the encryption specification ↗