Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatten invite API on MapeoManager #16

Open
gmaclennan opened this issue Oct 27, 2023 · 1 comment
Open

Flatten invite API on MapeoManager #16

gmaclennan opened this issue Oct 27, 2023 · 1 comment

Comments

@gmaclennan
Copy link
Member

This is a stylistic opinion, but if we are going to change it now is the time, to minimize refactoring later.

Currently the MapeoManager methods for invites are namespaced under mapeoManager.invite. This feels unnecessary given that nothing else on MapeoManager is namespaced, and now that we have events on the mapeoManager instance itself (local-peers), it could cause developer confusion trying to remember which events are emitted by mapeoManager and which events are emitted by mapeoManager.invite.

There are only two methods, I suggest we change them to:

  • manager.acceptInvite()
  • manager.rejectInvite()

And we change the event 'invite-received' to be emitted from the manager instance directly.

@achou11 thoughts?

@achou11
Copy link
Member

achou11 commented Oct 27, 2023

seems reasonable to me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants