Skip to content

Add channel membership view#52

Merged
cblgh merged 27 commits into
masterfrom
channel-membership
Aug 20, 2019
Merged

Add channel membership view#52
cblgh merged 27 commits into
masterfrom
channel-membership

Conversation

@cblgh

@cblgh cblgh commented Aug 17, 2019

Copy link
Copy Markdown
Member

this pr adds a view for channel membership.

it handles the message types channel/join and channel/leave, which are emitted in cabal-client when joining/leaving a channel.

it exposes the following api on the cabalInstance.memberships view:

  • getMemberships (core, key, cb) which gets the channels the specified peer has joined
  • getUsers(core, channel, cb) returns list of peers (as public keys) that have joined channel
  • isMember(core, key, channel, cb) returns a boolean that describes if peer with key is in channel

also in this pr: noffle showed me the ropes of how they create kappa views and it was great fun :3

@cblgh cblgh changed the title Channel membership Add channel membership view Aug 17, 2019
@hackergrrl

Copy link
Copy Markdown
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. ❤️

@hackergrrl

hackergrrl commented Aug 18, 2019

Copy link
Copy Markdown
Member

Great tests! Don't forget to rebase master too. 🐴

@cblgh

cblgh commented Aug 18, 2019

Copy link
Copy Markdown
Member Author

errr ya that was an attempt to rebase

@cblgh

cblgh commented Aug 20, 2019

Copy link
Copy Markdown
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

@hackergrrl

Copy link
Copy Markdown
Member

Another (complementary) feature could be filtering out channels that nobody is joined/watching.

@hackergrrl

Copy link
Copy Markdown
Member

I think the travis failure is not related to this PR, but something else that's on master too.

@cblgh cblgh merged commit ac1533d into master Aug 20, 2019
@cblgh cblgh deleted the channel-membership branch April 18, 2020 11:26
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

Successfully merging this pull request may close these issues.

2 participants