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

Show ID for downvotes from users in group Public Downvoters. #92

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

djls45
Copy link

@djls45 djls45 commented Feb 1, 2020

The group name is currently "Public Downvoters" because that's simple and descriptive. I kinda wanted to go with something more "in" for us, like "I am not boomzilla", but I didn't because I figured that it was contrary to the everyone-is-boomzilla in-joke and that newbies might not understand what is the purpose of the group.
The group will need to be created, but this code should work even without the group, if Groups.isMember() returns some falsy value when a group with the provided name does not exist.

@BenLubar
Copy link
Collaborator

BenLubar commented Feb 1, 2020

hmm, isn't Groups.isMember async?

@djls45
Copy link
Author

djls45 commented Feb 1, 2020

Groups.isMember() isn't called with an "await" later on in the file. I think "done" isn't defined in this context. I have added a simple function to coerce errors to false in a new commit.

Uses async map to resolve all downvoter IDs.
@djls45
Copy link
Author

djls45 commented Feb 1, 2020

Wait...
The Travis CI error is on line 28, character 31, at the token "function":
SocketPosts.getVoters = async function (socket, data) {

I didn't touch this part at all.
The promise map is likely more performant, though, so that's good. And I'm learning more Javascript, so that's a thing, too, I suppose.

Use async map to resolve all downvoter IDs. Reduce complexity.
@hungrierwtf
Copy link
Contributor

Wait...
The Travis CI error is on line 28, character 31, at the token "function":
SocketPosts.getVoters = async function (socket, data) {

I didn't touch this part at all.

Yeah, that's been happening for a while, even in emoji PRs that just add images

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