Highlights
Forum threads, replies and edits can now be refused before they are rendered and stored. Listen for the new PostSaving event and return a contracts.Rejection, and the client gets the usual 422 validation answer.
Added
- New package
eventswithPostSaving(event namegolem15.forum.post.saving), fired after the access and required-field checks and before rendering. It carries the context, the actor, the thread and post IDs, the title and body, andOp:events.OpThread,events.OpReplyorevents.OpUpdate. contracts.Rejection{Field, Message}: a listener returns it to refuse the write. The API answers 422 undererrors.titleorerrors.body(the field you name) and nothing is persisted.
Changed
- Any other listener error aborts the write and keeps the existing opaque error answer.
Without a PostSaving listener the plugin behaves exactly as v0.1.0. The forum plugin does not depend on chat.