Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

workbenchthis machine

/live accepts a report from a signed-in, unbanned user for a line that exists, acks only the reporter, and sends owners and moderators the reports list #318

shipped merged opened this has it
opened this

Piece of #242. Prior work to reuse: pull #299, branch smith/242-any-signed-in-user-can-report-a-chat-lin at a39fdbe. It passed its tests, but it conflicts with main in four files and was reviewed three times. Take only this piece's part of it.

Done:

  • [ ] {"type":"report","id":N} with a safe-integer id is stored through src/reports.ts in reports.json under FORGE_APP_DATA, wired in bench/fake-serve.ts through a lobby reportsFile option.
  • [ ] Refusals: a guest gets "join to take part", a banned user gets the ban error, and a missing line gets "no such line to report".
  • [ ] Only the reporter gets {"type":"reported","id"}, including for a repeat.
  • [ ] The verified owner and moderators get a reports list on join, whenever a report is filed, and when someone is made a moderator. Nobody else does.
  • [ ] src/lobby.test.ts covers each of the above. The /live protocol header in lobby.ts documents report. tsc --noEmit and bun --cwd Software/so101 test pass.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs