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

Prevent user from reacting to own post #17

Merged
merged 3 commits into from Feb 4, 2020
Merged

Prevent user from reacting to own post #17

merged 3 commits into from Feb 4, 2020

Conversation

imorland
Copy link
Member

It does not make sense for a user to react to their own post. This PR checks for this by:

  • Remove the reaction action from posts made by the session user (FE)
  • Performs an additional validation before attempting to save (BE)

@imorland
Copy link
Member Author

I've discovered an issue with this change - the logged in user no longer sees the reactions they have been awarded.

Another commit to follow shortly to fix this...

@imorland
Copy link
Member Author

Sorry about that, this should be good now :)

Copy link
Member

@dsevillamartin dsevillamartin left a comment

Choose a reason for hiding this comment

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

I commented a few things, a question & suggestion. Thanks for the PR! I'll build the JS after merging.

js/src/forum/components/PostReactAction.js Outdated Show resolved Hide resolved
js/src/forum/components/PostReactAction.js Show resolved Hide resolved
@dsevillamartin
Copy link
Member

Thanks for requesting a review again, not sure how I missed the recent changes, so I apologize for that.
I'll merge it later today if I find nothing else that should be modified. Thanks!

@imorland
Copy link
Member Author

imorland commented Feb 3, 2020

@datitisev thank you. This PR is currently deployed on the giffgaff preview community site, if you wish to see it in action easily :)

@dsevillamartin dsevillamartin merged commit 65a3eb7 into FriendsOfFlarum:master Feb 4, 2020
@dsevillamartin
Copy link
Member

dsevillamartin commented Feb 4, 2020

Thanks again! Tagged as 0.2.1 🙂

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