Add channel membership view#52
Merged
Merged
Conversation
Member
|
This is awesome @cblgh! What would be super duper rad is if there were some tests, to show that it all works, & to provide us with a sense of safety in case a regression breaks this in the future. ❤️ |
Member
|
Great tests! Don't forget to rebase |
This reverts commit ab650d9. Node 10 is failing tests; reverting.
… into channel-membership
Member
Author
|
errr ya that was an attempt to rebase |
Member
Author
|
in the future it might also be nice to have a message type that deprecates/archives channels, to prevent the channel listing (which shows joined + not joined) from overflowing with old mistakes of channels |
Member
|
Another (complementary) feature could be filtering out channels that nobody is joined/watching. |
Member
|
I think the travis failure is not related to this PR, but something else that's on master too. |
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.
this pr adds a view for channel membership.
it handles the message types
channel/joinandchannel/leave, which are emitted in cabal-client when joining/leaving a channel.it exposes the following api on the
cabalInstance.membershipsview:getMemberships (core, key, cb)which gets the channels the specified peer has joinedgetUsers(core, channel, cb)returns list of peers (as public keys) that have joinedchannelisMember(core, key, channel, cb)returns a boolean that describes if peer withkeyis inchannelalso in this pr: noffle showed me the ropes of how they create kappa views and it was great fun :3