Add embedded web chat client (closes #7) #8
No reviewers
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/chat#8
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/web-client"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the embedded web chat client as described in #7.
Changes
users,channel_members,messagestablesGET /from the single Go binarySee issue #7 for full architecture details and engineering rationale.
- GET /api/v1/state replaces /me and /channels - GET/POST /api/v1/messages replaces /poll, /channels/{ch}/messages, /dm/{nick}/messages - GET /api/v1/history for scrollback - DELETE /api/v1/channels/{name} replaces /channels/{channel}/part- Use /state instead of /me for auth check - Use /messages instead of /poll for message stream - Use unified POST /messages with 'to' field for all sends - Update part channel URL to DELETE /channels/{name}C2S (7): send, join, part, nick, topic, mode, ping S2C (12): message, dm, notice, join, part, quit, nick, topic, mode, system, error, pong S2S (6): relay, link, unlink, sync, ping, pong Each message type has its own schema file under schema/{c2s,s2c,s2s}/. schema/README.md provides an index of all types with descriptions.Remove schema/commands/ and schema/message.json, replaced by the new schema/{c2s,s2c,s2s}/*.schema.json structure.All client-to-server commands now go through POST /api/v1/messages with a 'command' field. The server dispatches by command type: - PRIVMSG/NOTICE: send message to channel or user - JOIN: join channel (creates if needed) - PART: leave channel - NICK: change nickname - TOPIC: set channel topic - PING: keepalive (returns PONG) Removed separate routes: - POST /channels/join - DELETE /channels/{channel} - POST /register (renamed to POST /session) - GET /channels/all (moved to GET /channels) Added DB methods: ChangeNick, SetTopic