momentum-mod / website

Momentum Mod's main website.
https://momentum-mod.org
MIT License
55 stars 60 forks source link

Disallow self follow #894

Closed alexwaibel closed 5 months ago

alexwaibel commented 5 months ago

This change prevents a user from following themself by both removing the "Follow" button from the profile view for the logged in user and by checking that target and logged in user are not the same in the follow API.

Closes #892

I simply removed the follow button component when viewing the logged in user's profile as this is not a bug in production so there should not be a risk of real users having following themself. If desired I can rework this to remove only the "Follow" button leave the "Unfollow" button.