Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve mod commands #39

Merged
merged 29 commits into from
May 23, 2020
Merged

Improve mod commands #39

merged 29 commits into from
May 23, 2020

Conversation

cblgh
Copy link
Member

@cblgh cblgh commented May 6, 2020

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

  • changing /ban to /hide
  • setting admins/mods as being only cabal-wide (as an experiment)
  • prints the names of the banned peers, or names of admins/mods, when listing
  • introduces support for the name.pubkey-suffix so you can do /ban troll.b33f or /mod add substack.1337
  • set's banned property to messages stemming from banned peers. check if msg.value.content.banned exists to see if you are processing a banned message

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

src/channel-details.js Outdated Show resolved Hide resolved
Copy link
Member

@okdistribute okdistribute left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concerns noted inline

src/commands.js Outdated Show resolved Hide resolved
src/channel-details.js Outdated Show resolved Hide resolved
src/commands.js Outdated Show resolved Hide resolved
src/commands.js Show resolved Hide resolved
src/commands.js Outdated Show resolved Hide resolved
@hackergrrl
Copy link
Member

introduces support for the name.pubkey-suffix

Sanity checking myself: you meant prefix, right?

@cblgh
Copy link
Member Author

cblgh commented May 8, 2020

@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
Copy link
Member

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. 👍

@hackergrrl
Copy link
Member

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

also tests! and other misc spot improvements.
@hackergrrl
Copy link
Member

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 ghost mentioned this pull request May 19, 2020
36 tasks
@ghost
Copy link

ghost commented May 20, 2020

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

@ghost
Copy link

ghost commented May 22, 2020

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

@hackergrrl
Copy link
Member

This now also depends on cabal-club/cabal-core#90

fixes a bunch of edge cases, including users with . in their name
@hackergrrl hackergrrl requested review from okdistribute and removed request for okdistribute May 23, 2020 04:17
@hackergrrl hackergrrl merged commit 6f3509e into master May 23, 2020
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.

3 participants