-
-
Notifications
You must be signed in to change notification settings - Fork 776
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
Added more moderation UI complete with user blocking/ignoring #3119
Conversation
Pics? Workflow? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
const role = model.get('role') ?? 'none'; | ||
const affiliation = model.get('affiliation'); | ||
|
||
const ownRole = muc.getOwnRole(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turns out that this variable is not needed since only applicable commands are considered,
and mute, kick, etc are not applicable to non moderators. So this variable factors out.
api.unblockUser([jid]); | ||
}; | ||
let handleKick = (ev) => { | ||
setRole(muc, 'kick', jid, [], ['moderator']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to export setRole and verifyAndSetAffiliation from the other file
const adminButton = html`<button class='btn btn-primary' @click=${handleAdmin}>Make Admin</button>` | ||
const ownerButton = html`<button class='btn btn-primary' @click=${handleOwner}>Make Owner</button>` | ||
|
||
// The following table stores a map from Affiliation x Role -> Button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should clarify, the mapping is from OwnAffiliation x { Target's Current Affiliation, Target's Current Role } -> Button
I've rebased and made some updates here: https://github.com/conversejs/converse.js/pull/ Closing this PR in favor of that one. |
Thanks for making a pull request to converse.js!
Before submitting your request, please make sure the following conditions are met:
CHANGES.md
document it in
docs/source/configuration.rst
with
make check
or you can run them in the browser by runningmake serve
and then opening
http://localhost:8000/tests.html
.