Merge pull request #1202 from siiky/docs/lam-434/tc
docs: update the T&C resolver comment
This commit is contained in:
commit
e4cf1d6297
1 changed files with 12 additions and 3 deletions
|
|
@ -240,9 +240,18 @@ const massageTerms = terms => (terms.active && terms.text) ? ({
|
|||
* Just (Just hash, Nothing) => Nothing
|
||||
* May happen (after `massageTerms`) if T&C are disabled.
|
||||
*
|
||||
* Just (Just hash, Just tc) => Just (hash, Just tc) or Just (hash, Nothing)
|
||||
* `tc` is sent depending on whether the `hash` differs from `currentHash` or
|
||||
* not.
|
||||
* Just (Just hash, Just tc) => Just (hash, Nothing, Nothing)
|
||||
* If both the `hash` and the `configVersion` are the same as `currentHash`
|
||||
* and `currentConfigVersion`, respectively, then there's no need to send
|
||||
* `text` nor `details`.
|
||||
*
|
||||
* Just (Just hash, Just tc) => Just (hash, Nothing, Just details)
|
||||
* If `configVersion` differs from `currentConfigVersion` but the `hash` is
|
||||
* the same, then only the details have to be updated.
|
||||
*
|
||||
* Just (Just hash, Just tc) => Just (hash, Just text, Just details)
|
||||
* If the `hash` differs from `currentHash` then everything is resent (to
|
||||
* simplify machine implementation).
|
||||
*/
|
||||
const terms = (parent, { currentConfigVersion, currentHash }, { deviceId, settings }, info) => {
|
||||
const isNone = x => _.isNil(x) || _.isEmpty(x)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue