cabal-club / cabal-client

interface for writing peer-to-peer chat clients
GNU General Public License v3.0
95 stars 14 forks source link

Improve mod commands #39

Closed cblgh closed 4 years ago

cblgh commented 4 years ago

this pr fixes a bunch of stuff from #38, and relies on https://github.com/cabal-club/cabal-core/pull/80. it adds a lot of minor features like

peers that are banned, or hidden, also have their content purged. it's just a (temporary!!) hack inside cabal-client, but felt way nicer to actually use :) (the peer's name isn't affected though)

image

hackergrrl commented 4 years ago

introduces support for the name.pubkey-suffix

Sanity checking myself: you meant prefix, right?

cblgh commented 4 years ago

@noffle Sanity checking myself: you meant prefix, right?

nope. names are usually seen as "cblgh" or whatever. but /ids adds pubkey-suffixes such as "cblgh.f33b". this PR adds support for using the latter form. (previously, in substack's pr, all you could do was use the entire public key)

suffix = after, prefix = before

hackergrrl commented 4 years ago

nope. names are usually seen as "cblgh" or whatever. but /ids adds pubkey-suffixes such as "cblgh.f33b". this PR adds support for using the latter form. (previously, in substack's pr, all you could do was use the entire public key)

Oh, I see the confusion: you meant suffix with respect to the displayed name. I meant prefix with respect to how we're showing the beginning of the pubkey in the nick. Gotchya. :+1:

hackergrrl commented 4 years ago

fyi I'm working on this PR: bubbling up cabal-core state into User objects for the frontends to use.

hackergrrl commented 4 years ago

OK! So now User objects (the things under cabal.users[key]) have a roles map that can tell you what their admin/mod/normal role is per-channel or cabal-wide, and this gets populated at load time from cabal-core.

Next up is listening to "roles-changed" events from the moderation view in -core to keep them synced.

ghost commented 4 years ago

updated to track the latest set of commands[1] with the cabal-core flags implementation[2]

ghost commented 4 years ago

The /inspect implementation depends on cabal-core/#87.

hackergrrl commented 4 years ago

This now also depends on https://github.com/cabal-club/cabal-core/pull/90