# Chat & Messaging ## Overview The app supports two chat modes: - **Direct messages**: Encrypted point-to-point messages to individual contacts - **Channel messages**: Broadcast messages to shared channels (see [Channels](channels.md)) This page covers direct messaging. For channel chat, see the Channels documentation. ## How to Access From the Contacts screen, tap any Chat-type contact to open the ChatScreen. ## Chat Screen Layout ### App Bar - **Title**: Contact name - **Subtitle**: Current routing path label (e.g., "2 hops", "flood (auto)", "direct (forced)") and unread count. Tapping the subtitle shows the full path details. - **Action button**: - **Overflow menu** (⋮ icon): Contains Routing, Info, Telemetry, Settings, Chat background, and Clear Chat. Routing opens the routing sheet where you can switch between Auto, Direct, and Flood routing and manage recent paths (hop count, round-trip time, age, success count, color-coded by repeater). Info shows a dialog with contact type, path, GPS coordinates, and public key. Chat background sets a color or picture (with a fade slider) behind this chat only; see [Chat backgrounds](themes.md#chat-backgrounds). ### Message List - Scrollable list with newest messages at the bottom - **Background**: The chat's own background, or the active theme's chat background when the chat has none (a theme set to **Use in every chat** replaces per-chat backgrounds). See [Chat backgrounds](themes.md#chat-backgrounds) - **Holiday animations**: A new message with a holiday greeting ("Happy Halloween", "Merry Christmas", and so on, in any app language) plays a short animation. Turn off in App Settings → Appearance; see [Holiday message animations](themes.md#holiday-message-animations) - **Outgoing messages**: Right-aligned, primary color background. **Failed messages** change to a red-toned error container background - **Incoming messages**: Left-aligned, grey background with a colored avatar (initial letter or first emoji of sender name; color is deterministic from a hash of the sender name) - Bubble width capped at 72% of screen width - Hyperlinks rendered as tappable green underlined text - Message text follows the system font size (Android/iOS accessibility text size); pinch-to-zoom scales on top of it - **Pinch-to-zoom**: Two-finger zoom (0.8x–1.8x) and double-tap to reset - **Jump to bottom**: Floating button appears when scrolled away from the bottom - **Lazy loading**: Scrolling to top loads older messages from storage. The newest 200 messages are kept in memory; up to 1000 per conversation are kept in storage - **Arrival order**: Messages are ordered by when they arrived on this device, not by the sender's clock. If a message's time is more than 5 minutes in the future, a small clock-warning icon appears next to its time (the sender's clock is probably wrong); tap it for an explanation ### Input Bar - **Send action button** (left, ⊕ icon): Opens a menu with **Send GIF** (GIF picker bottom sheet) and **Share my location** - **Share my location**: Sends your radio's current position (from the radio, not the phone's GPS) as a location pin. You're asked for a label (default: your node name) before sending; the keyboard's Send key confirms. If the radio reports no usable position (none set, or 0,0), the item is hidden and a snackbar says "Your radio has no location set". Location shares follow the same send cooldown as typed messages and are never sent as a reply. In channel chat the menu also holds **Send low-res image over radio** when image messages are set up - **Translation button** (optional, between GIF and text field): Shown only when translation is enabled in App Settings. Tap to configure outgoing-message translation language and on/off toggle. - **Text field** (center): Auto-capitalization, enforces UTF-8 byte limit in real-time - **Send button** (right): Submits the message - On desktop: Enter/Numpad Enter also submits - When a GIF is selected, the text field shows an inline GIF preview with a dismiss button ## Message Types | Type | Wire Format | Display | |---|---|---| | Plain text | Raw UTF-8 string | Inline text with link detection | | URL image preview | Image URL in text (per-contact opt-in; requires internet) | Downloaded inline preview | | GIF | `g:` | Inline GIF image from Giphy CDN | | Location pin | `m:,\|