mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
docs: add DM system, unified sidebar, themes, and quick-switch features
- Document full 1-on-1 DM implementation with REST endpoints, WebSocket events - Add unified sidebar architecture replacing 4-column Discord layout - Document theme system (neon-glow default, custom theme support) - Add quick-switch server overlay feature (door button) - Update PROTOCOL.md with dm_create, dm_channel_open/close events - Add ready payload dm_channels field for initial DM state - Expand CLAUDE.md key features section with all new implementations Changes reflect completed session work on sidebar redesign and DM system.
This commit is contained in:
@@ -399,6 +399,68 @@ then auto-reconnect after the delay expires.
|
||||
|
||||
---
|
||||
|
||||
## Direct Messages (DM)
|
||||
|
||||
### Create or Get DM Channel (Client → Server)
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "dm_create",
|
||||
"id": "req-uuid",
|
||||
"payload": {
|
||||
"user_id": 2
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Returns `dm_channel_open` (see below) or error if invalid user.
|
||||
|
||||
### DM Channel Open (Server → Client)
|
||||
|
||||
Sent after successful `dm_create` or when opening an existing DM.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "dm_channel_open",
|
||||
"payload": {
|
||||
"channel_id": 100,
|
||||
"user": {
|
||||
"id": 2, "username": "jordan",
|
||||
"avatar": "uuid.png", "status": "online"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### DM Channel Close (Client → Server)
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "dm_close",
|
||||
"id": "req-uuid",
|
||||
"payload": {
|
||||
"channel_id": 100
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### DM Channel Closed (Server → Client)
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "dm_channel_close",
|
||||
"payload": {
|
||||
"channel_id": 100
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
DM channels persist in the database but are marked as "closed" by the
|
||||
opening user. Messages in a closed DM auto-reopen it. Switching servers
|
||||
clears open DM state (DM channels not visible again until re-opened).
|
||||
|
||||
---
|
||||
|
||||
## Initial State (sent after auth_ok)
|
||||
|
||||
### Ready Server → Client
|
||||
@@ -420,6 +482,15 @@ then auto-reconnect after the delay expires.
|
||||
"position": 1
|
||||
}
|
||||
],
|
||||
"dm_channels": [
|
||||
{
|
||||
"channel_id": 100,
|
||||
"user": {
|
||||
"id": 2, "username": "jordan",
|
||||
"avatar": null, "status": "online"
|
||||
}
|
||||
}
|
||||
],
|
||||
"members": [
|
||||
{
|
||||
"id": 1, "username": "alex",
|
||||
|
||||
Reference in New Issue
Block a user