Closed renatomassaro closed 6 years ago
Ebert has finished reviewing this Pull Request and has found:
You can see more details about this review at https://ebertapp.io/github/HackerExperience/Helix/pulls/398.
Reviewed 11 of 11 files at r1, 1 of 1 files at r2. Review status: :shipit: complete! all files reviewed, all discussions resolved
Comments from Reviewable
Sometimes the backend may need to know that the player has performed some action on the client. This is mostly useful for storyline quests, as some steps may only proceed after the player performs an action like opening an app or clicking somewhere.
Obviously without an input from the frontend, it's impossible for Helix to know when this happened. That's what this PR solves: it adds a
client.action
endpoint on the AccountChannel, which may be used by HEBorn to notify Helix that the user performed some action.Naturally this sort of input isn't 100% reliable, since it originated on the client-side. If required, the backend may keep track of how many times the given action was performed, to make sure it only happens once (but that's only if it makes sense for that specific action). Since most client actions are related to the storyline (and do not offer a reward or something like that), it's OK to simply ignore repeated messages, but beware.
Other than that, if a more strict validation is required, the backend should check for the player context. Suppose action
A
can only be performed while player is going through stepS
. This can be verified on the backend. Other than that, little can be done to further verify the context.This change is