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

Check if a user is blocked before allowing them to redeem an invite #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mplorentz
Copy link

Fixes #29. This is necessary for pubs where the invites are published publicly.

I think it would be good to do a patch version bump after this is merged. Not sure what the etiquette is for that. Do I need to bump the ssb-invite version in package.json as part of this pull request?

Copy link
Member

@staltz staltz left a comment

Choose a reason for hiding this comment

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

Nice PR! I'm in favor of merging. Just have one comment in the code.

As general etiquette, PRs don't need to do version bumping. SSBC members do that post-merging

if (invite.used >= invite.total) { return cb(new Error('invite has expired')) }
// although we already know the current feed
// it's included so that request cannot be replayed.
if (!req.feed) { return cb(new Error('feed to follow is missing')) }
Copy link
Member

Choose a reason for hiding this comment

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

Could we move this up before the isBlocking call? Doesn't seem to be valid to call isBlocking when the dest is undefined.

Copy link
Member

@mixmix mixmix left a comment

Choose a reason for hiding this comment

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

I'm in favour of merging this. I would want tests added to and passing for this change to know it works

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.

Blocked users can redeem invites
3 participants