I'm generally adverse to sending calculated values like this
through the API.
 
I would be happy with an API call to get the server's current time
value which could then be used to calculate whether the vacation was
active via simple strcmp if you want, since ISO8601 dates are
lexically sortable.
 
Otherwise the client is displaying a value which may go stale within a
second of being calculated, causing the display to be incorrect, and the
client need to know if it should be checking for an updated value.
 
Bron.
 
 
On Fri, Jun 24, 2016, at 18:46, Benoit Tellier wrote:
> Nowadays, the JMAP server returns a VacationResponse.
>
> This vacation response comport :
> - an enable field
> - a fromDate
> - a toDate
>
> To know if the vacation is active (ie : response wil be sent to
> incoming mails) the client needs to verify the date is in the range
> and the vacation is enabled.
>
> This approch is limited as the client might have some issue with its
> local time (and thus might make errors on the activate status).
> Moreover, we concider this operation should belong to the server.
>
> Thus, we propose to add an additional field to the VacationResponse :
> "isActivated"
>
> Optional, calculated on the server side, ignored on client's
> SetVacationResponse request, it is true if the vacation is activated,
> false otherwise.
>
> See https://github.com/jmapio/jmap/pull/50 for actual spec
> modifications.
>
> Regards,
>
> Benoit
>
> --
>  You received this message because you are subscribed to the Google
>  Groups "JMAP" group.
>  To unsubscribe from this group and stop receiving emails from it,
>  send an email to [email protected].
>  To post to this group, send email to [email protected].
>  To view this discussion on the web visit
>  
> https://groups.google.com/d/msgid/jmap-discuss/13bee244-a7a7-43cf-8d0e-65d5227083e6%40googlegroups.com[1].
>  For more options, visit https://groups.google.com/d/optout.
 
--
Bron Gondwana
[email protected]
 
 

Links:

  1. 
https://groups.google.com/d/msgid/jmap-discuss/13bee244-a7a7-43cf-8d0e-65d5227083e6%40googlegroups.com?utm_medium=email&utm_source=footer

-- 
You received this message because you are subscribed to the Google Groups 
"JMAP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jmap-discuss/1466765061.2634449.647279289.0F7DFB69%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to