mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Wires up raw TS3 protocol commands for offline messages, since tsclientlib's generated code has no typed builder for them (same situation as banlist/complainlist in the previous feature): - Connector: messagelist, messageget, messageadd, messagedel, messageupdateflag as raw OutCommand invocations. Replies parsed via the existing StreamItem::MessageEvent pending-flag pattern, reusing InMessage::OfflineMessageList (list, no body) and InMessage::OfflineMessage (single message with full body, response to messageget). - Gateway: typed events/methods threading the new commands from WebSocket clients through to the connector's stdin protocol. - Frontend: new "Offline Nachrichten" dialog in the Extras menu with a message list (subject/from/timestamp, unread dot), a detail view (full body + mark-as-read), delete, and a compose form to send a new message to a target client UID. Demo mode gets one scripted message. Verified against the real test server (192.168.178.108): messagelist returns a clean DatabaseEmptyResult error for an account with no messages (falls back to the dialog's existing 6s "unavailable" timeout, same as banlist/complainlist), and messageadd correctly surfaces a permissionError for a guest account lacking send rights - both proving the raw command round-trip works end to end. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the Oxlint configuration
If you are developing a production application, we recommend enabling type-aware lint rules by installing oxlint-tsgolint and editing .oxlintrc.json:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "typescript", "oxc"],
"options": {
"typeAware": true
},
"rules": {
"react/rules-of-hooks": "error",
"react/only-export-components": ["warn", { "allowConstantExport": true }]
}
}
See the Oxlint rules documentation for the full list of rules and categories.