general function docs for the interfaces of cabal-client: api docs
the file we'll likely serialize the out-of-log storage is client.js
file containing channel related logic & state channel-details.js
- PMs are represented just like regular channels, except populated with messages from a different type of emitted event, see channel-details.js#L215
- PM channels can't be renamed (the name of the channel is the public key of the person you are chatting with atm)
- cabal-details.js contains the brunt of the logic for cabal-client's interactions. this is the place to remove a logic guard when you want enable leaving of PMs: cabal-details.js#L519-L521
- you will not want to emit a channel/leave message or otherwise log this in cabal-core using
this.core.publish(leaveMsg, ...)
, but instead implement custom logic to change the state of the private channel instance + persist that state in the out-of-log store
- you will not want to emit a channel/leave message or otherwise log this in cabal-core using
- the out of log store could be as simple as a json object that's saved to disk at a useful location; once we have it, it will be used for local state stuff like remembering which messages are unread in which channels, or (maybe) storing private moderation actions