-
Notifications
You must be signed in to change notification settings - Fork 0
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 post was hidden #53
Conversation
const numberCommentId = commentId.toNumber() | ||
if ( | ||
(await isBanned(numberFeedId, numberPostId)) || | ||
(await isBanned(numberFeedId, numberPostId, numberCommentId)) |
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.
I don't think the second condition will be true because it won't and cannot be banned when the listener catches a new comment.
I assume we need to check only the post, if it is banned or not.
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.
If you want to check the parent comment (replyTo), you have a fourth prop (eventComment) which contains replyTo
. If it's equal to 0, this is a comment to the post; otherwise, it's a comment to comment.
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.
Let's remove this check for now - await isBanned(numberFeedId, numberPostId, numberCommentId)
Don't forget to create a task to check parent comment if it's block, before notify about it
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.
We need to block pushes if post or parent comment is blocked
const numberCommentId = commentId.toNumber() | ||
if ( | ||
(await isBanned(numberFeedId, numberPostId)) || | ||
(await isBanned(numberFeedId, numberPostId, numberCommentId)) |
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.
Let's remove this check for now - await isBanned(numberFeedId, numberPostId, numberCommentId)
Don't forget to create a task to check parent comment if it's block, before notify about it
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.
Looks good, let's merge it in the morning :)
No description provided.