Tillagt
- Plugin skeleton: activation/upgrade hooks, HPOS compatibility declaration, WooCommerce presence check.
- Storage:
wctc_channels,wctc_messages,wctc_readstables (WCTC_Install), seeded with a publicgeneralchannel. WCTC_Repository: channel visibility (public, private per-user agent, DM), message pages, read markers, unread counts, lazy DM and agent channel creation.- REST API
wctc/v1:GET /channels,GET /channels/{id}/messages,POST /channels/{id}/messages(idempotent, rate-limited),POST /channels/{id}/read,GET /unread,POST /channels/dm,GET /users. Contract documented indocs/rest-contract.md. uninstall.phppurge, opt-in via thewctc_purge_on_uninstalloption.README.mdfor GitHub: status, features and roadmap, requirements, access model, privacy, hooks, development gates.composer php:compatgate (PHPCompatibility,testVersion 7.4-) next to PHPStan's PHP 7.4 target.
Ändrat
- Message bodies are stored as plain text (valid UTF-8, normalised line breaks, control characters removed) instead of through
sanitize_textarea_field, which HTML-escaped a lone<and dropped%xxsequences. - Read markers are written atomically (
INSERT IGNORE+ conditionalUPDATE) and the stored value is returned, so concurrentPOST /readcalls no longer collide on the primary key and the marker never moves backwards. - Idempotency keys are scoped per user and channel; a failed insert returns
500 wctc_store_failedinstead of a201with an empty message. - DM and agent channel lookups read before inserting, so
GET /channelsno longer consumes anAUTO_INCREMENTvalue on every call.