feat: add real-time event polling support#12
Merged
Conversation
Add BroadcastService that hooks into ticket lifecycle actions to store events in a WordPress transient buffer. Events include ticket.created, ticket.updated, ticket.statusChanged, reply.created, and ticket.assigned. REST polling endpoint GET /escalated/v1/events?since= returns events newer than the given timestamp. Configurable via escalated_broadcasting_enabled setting (default: false). Buffer auto- caps at 100 events with 5-minute TTL. Includes PHPUnit tests covering event push, filtering, buffer limits, lifecycle hooks, and toggle.
Merge main into broadcasting branch, resolve API bootstrap and escalated.php conflicts to include all controllers and services. Apply Pint formatting fixes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BroadcastServicethat hooks into ticket lifecycle actions (escalated_ticket_created,escalated_ticket_status_changed,escalated_reply_created, etc.) to store events in a WordPress transient bufferticket.created,ticket.updated,ticket.statusChanged,reply.created,ticket.assignedGET /escalated/v1/events?since={timestamp}returns events newer than the given timestampGET /escalated/v1/events/typeslists supported event typesescalated_broadcasting_enabledsetting (default: false)Api_Bootstrapandclass-escalated.phpTest plan