WPB-26705: add meeting.create/update/delete lifecycle events#5330
WPB-26705: add meeting.create/update/delete lifecycle events#5330blackheaven wants to merge 10 commits into
Conversation
Add meeting lifecycle websocket notifications (meeting.create,
meeting.update, meeting.delete) emitted on every successful create,
update, and delete operation. Events are pushed to all local members
of the meeting's conversation via NotificationSubsystem.
- New Wire.API.Event.Meeting type with EventType enum and Event record
serializing to {type, time, qualified_id}
- Golden tests for the new Event type
- MeetingsSubsystem.Interpreter emits events via pushMeetingEvent helper
- Unit tests verify event emission (and absence on failed operations)
- Integration tests await meeting.* notifications on create/update/delete
There was a problem hiding this comment.
Pull request overview
Adds a new meeting lifecycle event type to the public API and emits corresponding websocket notifications from the Meetings subsystem for create/update/delete operations, with unit + integration coverage and golden JSON fixtures.
Changes:
- Introduce
Wire.API.Event.Meeting(schema + JSON + golden fixtures) and expose it fromwire-api. - Emit
meeting.create,meeting.update, andmeeting.deletenotifications viaNotificationSubsystemduring meeting lifecycle operations. - Extend unit/integration tests and document the feature in the changelog.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| libs/wire-subsystems/test/unit/Wire/MeetingsSubsystem/InterpreterSpec.hs | Adds unit tests validating meeting lifecycle events are pushed (and not pushed on non-creator operations). |
| libs/wire-subsystems/src/Wire/MeetingsSubsystem/Interpreter.hs | Emits meeting lifecycle push notifications on successful create/update/delete. |
| libs/wire-api/wire-api.cabal | Exposes the new meeting event module and includes generated golden test module. |
| libs/wire-api/test/golden/testObject_Event_meeting_1.json | Golden JSON for meeting.create event. |
| libs/wire-api/test/golden/testObject_Event_meeting_2.json | Golden JSON for meeting.update event. |
| libs/wire-api/test/golden/testObject_Event_meeting_3.json | Golden JSON for meeting.delete event. |
| libs/wire-api/test/golden/testObject_Event_meeting_4.json | Additional golden JSON for meeting.create event. |
| libs/wire-api/test/golden/testObject_Event_meeting_5.json | Additional golden JSON for meeting.update event. |
| libs/wire-api/test/golden/testObject_Event_meeting_6.json | Additional golden JSON for meeting.delete event. |
| libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_meeting.hs | Generated Haskell fixtures for meeting event golden tests. |
| libs/wire-api/test/golden/Test/Wire/API/Golden/Generated.hs | Registers the new meeting event golden tests in the test suite. |
| libs/wire-api/src/Wire/API/Event/Meeting.hs | Implements the new meeting lifecycle event type + schema/JSON. |
| integration/test/Test/Meetings.hs | Updates integration tests to await new meeting lifecycle websocket notifications. |
| integration/test/Notifications.hs | Adds websocket notification matchers for meeting lifecycle event types. |
| changelog.d/2-features/wpb-26705-meeting-events.md | Documents the new meeting lifecycle websocket notifications. |
| instance ToJSONObject Event where | ||
| toJSONObject e = case toJSON e of | ||
| Object o -> o | ||
| _ -> error "Wire.API.Event.Meeting.Event.toJSON did not produce an Object" |
battermann
left a comment
There was a problem hiding this comment.
Are events sent on meetings clean ups that run in the background?
There was a problem hiding this comment.
send the event after successful deletion
| -------------------------------------------------------------------------------- | ||
| -- EventType | ||
|
|
||
| data EventType = MeetingCreate | MeetingUpdate | MeetingDelete |
There was a problem hiding this comment.
Why a new event type? Why not extend the conversation events with new cases?
There was a problem hiding this comment.
I have hesitated, given it's a distinct life-cycle, I can integrate it if you want
Co-authored-by: Leif Battermann <[email protected]>
…after successful deletion
No, they won't be shown in clients after 48h, while clean up worker remove them after 30 days, that would lead to client's confusion. |
https://wearezeta.atlassian.net/browse/WPB-26705
Checklist
changelog.d