Deepen the message base: threads, votes, polls, aliases, signatures, groups, retention

For every front end (internal/app), the API and the CLI:

- Threads: from a message, the one it answers (O, PF2) and its whole
  thread (T, PF6), replies under what they answer; GET
  /messages/{id}/thread.
- Votes: up, down or none on a message (V, PF1), shown by its number;
  POST /messages/{id}/vote.
- Polls: a question and 2 to 10 answers posted in an area (L, PF9),
  answered (A, PF12) and shown with each answer's share; POST with
  "poll", POST /messages/{id}/answer.
- Aliases: a user's alias (checked like a new name, no one's name or
  alias) posted under in areas that allow it; the message's From is the
  alias everywhere, newsgroup articles included (they used the real
  name), while the sysop keeps whose it is.
- Signatures: up to three lines under posts and mail written on the BBS.
- Groups: areas listed by group, with a Group column.
- Retention: an area keeps its newest N messages and/or those of the
  last D days, purged hourly and by bbs area purge.

Tested on SQLite, PostgreSQL, MySQL and MariaDB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
This commit is contained in:
Claude committed 2026-10-12 18:06:52 +00:00
1 parent a93a2cf303
commit bccdf2cc6a
22 files changed
+1103 -74

No files matched your search

+3 -1
View File
@@ -71,7 +71,7 @@ Errors are `{"error": "...", "code": "..."}`.
| `GET /users`, `/users/{name}` | users | read |
| `GET /areas`, `/areas/{id}` | message areas, with your unread | read |
| `GET /areas/{id}/messages?after=&limit=&body=no` | messages after an id (200 at most) | read |
| `POST /areas/{id}/messages` | post: `{"subject", "body", "reply_to"}` | post |
| `POST /areas/{id}/messages` | post: `{"subject", "body", "reply_to", "alias": true, "poll": ["answer", ...]}` | post |
| `PUT /areas/{id}/lastread` | mark read up to a message | read |
| `GET /messages/{id}` | a message | read |
| `GET /mail`, `GET`, `DELETE /mail/{id}` | your inbox; a mail (marked read); delete it | mail |
@@ -79,6 +79,8 @@ Errors are `{"error": "...", "code": "..."}`.
| `GET /fileareas`, `/fileareas/{id}/files`, `/files/{id}` | file areas and files | files |
| `POST /fileareas/{id}/files?name=&description=` | upload: the body is the file | files |
| `GET /files/{id}/content` | download (ranges work) | files |
| `GET /messages/{id}/thread` | the message's thread from its start, with each one's depth | read |
| `POST /messages/{id}/vote`, `POST /messages/{id}/answer` | vote (`{"value": 1}`, -1, 0); answer a poll (`{"answer": 0}`) | post |
| `GET /files?q=` or `?since=` | files by words in their names and descriptions, or added since a time (RFC 3339), newest first | files |
| `GET /admin/bans`, `DELETE /admin/bans/{ip}` | addresses banned for failed logins; lift a ban | sysop |
| `GET /admin/hacklog?lines=` | the hack log's last lines | sysop |