Skip to content

Add lifecycle hooks for external plugins #862

Description

@sudofox

I'd like to propose three small additions to the plugin API so integrations don't have to monkey-patch internal classes.

  • "afterNewThread({ thread, user, opts })"
    Fires after a thread is successfully created.

  • "afterStaffReply({ thread, moderator, threadMessage })"
    Fires only after a staff reply is successfully delivered to the user.

  • "beforeThreadClose({ thread, context, cancel })"
    A cancellable hook that runs before any thread is closed, regardless of whether the close was initiated by staff, a schedule, or another internal path.

These would enable integrations like ticket synchronization, assignment tracking, and close-policy enforcement using the public plugin API instead of relying on private internals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions