Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

Add support for client-performed actions #398

Merged
merged 2 commits into from
Jun 14, 2018

Conversation

renatomassaro
Copy link
Member

@renatomassaro renatomassaro commented Apr 6, 2018

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 step S. This can be verified on the backend. Other than that, little can be done to further verify the context.


This change is Reviewable

@sourcelevel-bot
Copy link

Ebert has finished reviewing this Pull Request and has found:

  • 1 possible new issue (including those that may have been commented here).
  • 2 fixed issues! 🎉

You can see more details about this review at https://ebertapp.io/github/HackerExperience/Helix/pulls/398.

@renatomassaro
Copy link
Member Author

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

@renatomassaro renatomassaro merged commit bd4537c into HackerExperience:master Jun 14, 2018
@renatomassaro renatomassaro deleted the client-actions branch June 14, 2018 22:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant