# Lotus Chat

A Matrix chat client built for Lotus Guild — fast, private, and packed with the features you actually want.

**Deployed at [chat.lotusguild.org](https://chat.lotusguild.org)** &nbsp;|&nbsp; Forked from [Cinny](https://github.com/cinnyapp/cinny) v4.12.1

---

## Licensing & Attribution

The source code is licensed under [AGPLv3](LICENSE), the same license as the upstream Cinny project. The source for this fork is public at [code.lotusguild.org/LotusGuild/cinny](https://code.lotusguild.org/LotusGuild/cinny).

The Lotus Chat logo (`lotus_chat.png`) is a derivative work based on the original Cinny logo by Ajay Bura and contributors, used under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). The modified logo is © Lotus Guild and is also made available under CC BY 4.0.

---

## Features

### Messaging

- See who has read each message, and track delivery status (sending / sent / failed)
- Bookmark any message and revisit saved messages from the sidebar
- Schedule messages to send at a specific time
- Click "edited" on any message to see the full edit history
- Drafts are saved automatically and survive page reloads
- Long messages collapse automatically — click "Read more" to expand
- Forward messages to other rooms
- Create and view polls directly in chat
- Share your location with an inline map embed
- Add captions to image and video uploads
- Optionally compress images before uploading — shows before/after file sizes
- GIF links from Giphy and Tenor auto-preview inline
- Search for and send GIFs from a built-in GIF picker
- Control voice message playback speed: 0.75× / 1× / 1.5× / 2×
- Search messages with a date range filter
- Room topics support rich formatting (bold, links, italics)
- Deleted messages show a placeholder instead of disappearing
- Code blocks highlight syntax for JS/TS, Python, and Rust
- Rich link preview cards for YouTube, GitHub, Twitter/X, Reddit, Spotify, Twitch, Steam, Wikipedia, Discord, npm, Stack Overflow, and IMDb

### Calls & Voice

- Push to Talk with a configurable keybind (default: Space)
- Push to Deafen with the M key
- Camera starts turned off by default when joining a call
- Screenshare requires confirmation before going live
- Toggle noise suppression on or off
- Calls float in a draggable picture-in-picture window when you navigate away
- Your chat background shows through the call view
- Dark/light mode inside calls matches your Lotus Chat theme
- Calls are available in DMs and private groups only — no accidental mass rings

### Customization & Appearance

- LotusGuild Terminal Design System (TDS) — a CRT terminal-inspired dark theme
- TDS light mode variant for daytime use
- 20+ static chat background patterns
- 5 animated chat backgrounds: Digital Rain, Star Drift, Grid Pulse, Aurora Flow, Fireflies
- Toggle to pause background animations
- Glassmorphism sidebar — frosted glass effect that lets the background show through
- Night Light / blue light filter with an adjustable intensity slider
- Emoji prefixes on room names render larger in the sidebar (e.g. 🎮 general)
- Rename any room for yourself only — other members see the original name
- Emoji picker on all room name inputs

### Presence & Profile

- Discord-style presence selector: Online, Idle, Do Not Disturb, Invisible, or Auto
- Custom status message with emoji and an optional auto-clear timer
- Colored presence ring on member avatars (green / yellow / red)
- Profile fields for pronouns and timezone
- When a user's timezone is set, their current local time appears in their profile
- Unread count shown in the browser tab title

### Moderation & Privacy

- Report any room to homeserver admins from the room menu
- View policy lists and ban lists (Draupnir-compatible, read-only)
- Toggle private read receipts so others can't see when you've read messages
- Optional warning when an encrypted room contains unverified devices
- Full push rule editor in notification settings
- View and edit Server ACL rules in room settings
- Filterable room activity / mod log (joins, kicks, bans, power level changes, etc.)
- Room stats and insights panel (active members, top reactions, media breakdown, activity heatmap)
- Export room history as plain text, JSON, or HTML with optional date range filter

### Notifications

- In-app toast notifications appear bottom-right when the window is focused
- Custom notification sounds per category (messages, invites)
- Quiet hours — suppress notifications during a configured time window
- Click a toast to jump directly to the room or DM

### UX

- Filter and search rooms in the sidebar
- Favorite rooms sync across devices and appear in a pinned section
- Sort rooms by recent activity, alphabetical, or unread first
- DM rows show a message preview and relative timestamp
- Right-click a room for a context menu: mute with duration, copy link, mark as read
- Quick emoji reactions appear on message hover — one click to react
- Knock-to-join: request access to a room; admins approve or deny from the members list
- Media gallery drawer: browse all images, videos, and files shared in a room
- Invite link and QR code in room settings
- Pending knock requests shown in the members list for room admins
- Homeserver support contact displayed in Help & About (MSC1929)
- Server notice rooms are visually distinct from regular DMs

---

## Desktop App

Lotus Chat has a desktop app for Windows, macOS, and Linux. It wraps the same web client in a native window with automatic background updates — no need to reinstall for new versions.

### Download

Download the latest release from the [Releases page on code.lotusguild.org](https://code.lotusguild.org).

### SmartScreen Warning (Windows)

When you first run the installer on Windows, you may see a popup that says **"Windows protected your PC"** with the app listed as an unknown publisher. This is normal.

**Why it happens:** Windows SmartScreen flags any app that does not have an expensive commercial code-signing certificate from a major CA. Lotus Chat is signed with its own key for update verification, but that key is not in Microsoft's pre-approved list.

**How to install anyway:**

1. Click **"More info"** in the SmartScreen dialog.
2. A **"Run anyway"** button will appear.
3. Click it to proceed with installation.

After the first install, automatic in-app updates handle all future versions — you will not see this prompt again for updates.

---

## For Developers

The source code lives in `/root/code/cinny`. All changes should be made on the `lotus` branch. Push to `origin/lotus` and CI will automatically build and deploy to [chat.lotusguild.org](https://chat.lotusguild.org) in approximately 11 minutes — no manual build or deploy steps required.

See [LOTUS_FEATURES.md](LOTUS_FEATURES.md) for the full feature changelog and [LOTUS_TODO.md](LOTUS_TODO.md) for the work backlog.

### Build

```bash
npm ci && npm run build   # outputs to dist/
```

If the build is killed due to out-of-memory:

```bash
NODE_OPTIONS=--max_old_space_size=6144 npm run build
```

### CI/CD

```
edit → commit → git push    →    ~11 min    →    live at chat.lotusguild.org
```
