cabal-club / cabal-cli

Terminal client for Cabal, the p2p chat platform.

Home Page:https://cabal.chat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enhancement: Only show channels if you join them

soyuka opened this issue · comments

I'm not sure if this would work on the current implementation (1 chat => n channels => 1 hyperdb) but I think that it'd be nice to only receive data related to channels you've joined.

commented

Yeah this would work, i think actually right now you aren't receiving the data from the channels, it just renders that they are available in the sidebar

Although when I ctrl+n to a channel I haven't joined I see it's history right?
So, IIUC getChannels gets every channels available, we may filter there by taking only channels that belong to the self.channels array (those are the joined ones).
I'm willing to patch this if you guys think it's a good idea!

After a second though, it'd maybe be better to filter the displayed channels with the ones that one has actually joined.

I've been thinking about a cabal-client module that cabal clients could use, that handle tracking session data like channels joined, message-read-up-to per channel, what DMs/PMs you've read or not (once implemented), etc. I started speccing it out here: https://github.com/cabal-club/cabal-client

How would you picture DMs/PMs? Could they be sent through auto-defined channels that would be joined by both users? For privacy issues, these channels should not be joinable manually.

@soyuka I was thinking they'd just be channel-less messages of type chat/text that are encrypted using the public key of the recipient. There could be an index that accumulates the messages that you know how to decrypt (ones you sent; ones you've received) and show it in the channel list (though it itself wouldn't be a channel).