Giter VIP home page Giter VIP logo

Comments (5)

bleistivt avatar bleistivt commented on August 16, 2024

Unfortunately this will probably never be possible since reactions are (in most use cases) connected to positive (or negative) points affecting the users score (which could then be gamed more easily). There are also checks in place (both in the controller logic and the database schema) to ensure that reactions are unique.

Together with your other issues it looks like you are trying to achieve a reaction system similar to GitHub or Discord (unlimited emoji reactions) while this plugin is more similar to the way Facebook handles reactions i think (fewer, unique reactions). A completely separate reaction plugin (that omits the aggregation by reaction type in profiles) would probably be needed here.

from yaga.

garygreen avatar garygreen commented on August 16, 2024

Yes we're trying to achieve a reaction system similar to Github and Discord.

For adding multiple reactions - I'm only refering to adding of one type of reaction per user. So in other words, I couldn't "game" the system by adding 10 likes to a post. I'd only be able to add 1 like, 1 heart, etc. Exactly as Github and Discord does.

Also you can't really "game" the system much this way because aren't the pointed calculated based on other people's reactions to your posts? That seems logical, rather than reacting to your own posts.

It also makes sense that you can gain points on multiple reactions on the same post - for example, if someone finds your post both Insightful and Funny you should be able to earn points on both.

Even if this is still problematic, for those that aren't that interested in awarding badges based on reaction points I would rather have the ability to add multiple reactions than be limited to just one.

from yaga.

bleistivt avatar bleistivt commented on August 16, 2024

I'll think about adding a switch for this. It would require database changes however (a utility/structure migration) since there is currently a UNIQUE index in place that prevents multiple reactions being inserted by the same user. This used to be a problem when spam clicking reactions so I'm kind of hesitant to completely remove it again.

from yaga.

garygreen avatar garygreen commented on August 16, 2024

This used to be a problem when spam clicking reactions so I'm kind of hesitant to completely remove it again.

Should probably be a minor cooldown when clicking reactions, limited in JS. So wait 500ms or so before sending reactions by ajax. That way if user spammed clicked at least it won't flood server.

Validation check should be in place to make sure they aren't adding reaction of the same type. I dunno how the toggling is done internally though.

from yaga.

bleistivt avatar bleistivt commented on August 16, 2024

Validation checks like this have always been in place. This is more of an issue with race conditions caused by laggy (mobile) connections and users trying to quickly remove a reaction they made mistakenly for example. Throttling/debouncing doesn't really help here. The backend should reject invalid entries like this in any case which is exactly what database constraints are for.

To ensure correctness the index would need to be extended to (InsertUserID, ParentID, ParentType, ActionID)

from yaga.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.