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

add moderation class, new cmd /moderation, and fix cmd output #50

Merged
merged 4 commits into from
May 26, 2020

Conversation

cblgh
Copy link
Member

@cblgh cblgh commented May 24, 2020

this pr moves some of the moderation commands from commands.js to a new class, and exposes a bunch of methods.

the intent is for clients other than the terminal client to be able to easily use moderation commands. e.g. cabal desktop can tie menu actions to moderation commands more easily

  • a bunch of moderation commands are now exposed on each cabal-details instance e.g. details.moderation, see moderation.js for the full listing atm
  • /moderation is a new command for showing moderation related commands
  • output from /help has been fixed by making use of monotonic timestamps
  • adds new event, command: details.on('command', ({ command, arg })

@cblgh cblgh merged commit 07c44a9 into master May 26, 2020
@ghost ghost mentioned this pull request May 26, 2020
36 tasks
@@ -248,6 +252,7 @@ class CabalDetails extends EventEmitter {
*/
addStatusMessage(message, channel=this.chname) {
if (!this.channels[channel]) return
debug(channel)
Copy link
Member

Choose a reason for hiding this comment

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

Leftover debug output?

Copy link
Member Author

Choose a reason for hiding this comment

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

hehe oops :^)

@@ -43,6 +43,14 @@ module.exports = {
})
}
},
share: {
help: () => 'print a cabal key with you as admin. useful for sending to friends',
Copy link
Member

Choose a reason for hiding this comment

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

Discussion point: do we want /share to share with you as admin, or with you + whoever is in your admin/mod-keys?

Copy link
Member Author

Choose a reason for hiding this comment

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

@noffle good discussion point! my reasoning was as follows:

what i reckoned was that it would get so absurdly long as to be useless if we shared all the admin + modkeys, which is why i opted for sharing oneself as an admin; reasoning that would have a similar effect

(at least that was what i was thinking at the time; given that the passed-in admin/modkeys don't actually issue admin/mods as statements then they won't be transitively be available)

Copy link
Member

Choose a reason for hiding this comment

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

Hey! I wasn't sure where to continue this convo :)

As I understand it, most people have one admin key. So a /share that used your admin keys should also just include one key, right? It feels like it might get confusing if inviting another user gives them a different moderation view than yours.

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.

None yet

2 participants