allow Connect client to backdate unlocks #2618
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While a Connect client is unable to communicate with the server, it will continue to send unlocks periodically. The server currently sets the unlock time to be when it receives the unlock message. If it takes 10 minutes of retries for an unlock to finally reach the server, this will cause the unlock to be logged 10 minutes later than when it was actually unlocked.
Generally, this isn't an issue, but players are starting to rely on the disconnected behavior to do long play sessions while travelling without internet. When internet becomes available, all unlocks are handled in a short period of time. This makes following the flow of a player through a game difficult and can lead users to question the validity of the unlocks.
This PR adds a new
o
parameter to theawardachievement
andsubmitlbentry
APIs that allows the server to backdate the event up to two weeks. To minimize abuse of this functionality, a validation hash is required. If the correct validation hash is not provided, the event will not be backdated.Because sessions are abandoned if inactive for more than 10 minutes, these backdated events will normally appear outside of sessions and will appear in Generated Sesssions when viewed: