Skip to content

MatrixRTC MembershipManger: remove redundant sendDelayedEventAction and expose status#4747

Merged
toger5 merged 10 commits intodevelopfrom
toger5/membership-manager-one-send-delayed-action
Mar 25, 2025
Merged

MatrixRTC MembershipManger: remove redundant sendDelayedEventAction and expose status#4747
toger5 merged 10 commits intodevelopfrom
toger5/membership-manager-one-send-delayed-action

Conversation

@toger5
Copy link
Copy Markdown
Contributor

@toger5 toger5 commented Mar 12, 2025

We do already have the state hasMemberEvent that allows to distinguish the two cases. No need to create two dedicated actions.

This also moves code from NewMemberhsipManager.ts -> types.ts.

And we expose status through an event emitter for the membership manager.

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

@toger5 toger5 changed the title Remove redundant sendDelayedEventAction MatrixRTC MembershipManger: remove redundant sendDelayedEventAction Mar 12, 2025
@toger5 toger5 marked this pull request as ready for review March 13, 2025 10:38
@toger5 toger5 requested a review from a team as a code owner March 13, 2025 10:38
@toger5 toger5 requested review from BillCarsonFr and hughns March 13, 2025 10:38
@toger5 toger5 force-pushed the toger5/membership-manager-one-send-delayed-action branch from 005398a to 041c915 Compare March 24, 2025 09:26
@toger5 toger5 changed the title MatrixRTC MembershipManger: remove redundant sendDelayedEventAction MatrixRTC MembershipManger: remove redundant sendDelayedEventAction and expose status. Mar 24, 2025
Copy link
Copy Markdown
Member

@hughns hughns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had an initial pass over this, but I think I will need to look again with fresh eyes.

Whilst the PR could be split out into a refactor and the logic change I found it easy enough to split out whilst reviewing.

Comment thread src/matrixrtc/NewMembershipManager.ts Outdated
Comment thread src/matrixrtc/NewMembershipManager.ts Outdated
Comment thread src/matrixrtc/NewMembershipManager.ts Outdated
Comment thread src/matrixrtc/NewMembershipManager.ts Outdated
Comment thread spec/unit/matrixrtc/MembershipManager.spec.ts Outdated
@hughns hughns changed the title MatrixRTC MembershipManger: remove redundant sendDelayedEventAction and expose status. MatrixRTC MembershipManger: remove redundant sendDelayedEventAction and expose status Mar 24, 2025
@toger5 toger5 force-pushed the toger5/membership-manager-one-send-delayed-action branch from e193efc to c77db51 Compare March 24, 2025 18:30
Copy link
Copy Markdown
Member

@BillCarsonFr BillCarsonFr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just read the code to get a better understanding of membership manager. I have question

Comment thread src/matrixrtc/types.ts Outdated
toger5 added 10 commits March 25, 2025 12:14
We do already have the state `hasMemberEvent` that allows to distinguish the two cases. No need to create two dedicated actions.
 - deprecate isJoined (replaced by isActivated)
 - move Interface types to types.ts
Copy link
Copy Markdown
Member

@hughns hughns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With fresh eyes and the updated comments this looks good 👍

@toger5 toger5 added this pull request to the merge queue Mar 25, 2025
Merged via the queue into develop with commit 5a65c84 Mar 25, 2025
30 checks passed
@toger5 toger5 deleted the toger5/membership-manager-one-send-delayed-action branch March 25, 2025 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants