pub async fn handle_chat_query_changes<B: ChatBackend>(
backend: &B,
caller: &B::CallerCtx,
args: Value,
using: &[String],
) -> Result<HandlerOutput, JmapError>Expand description
Handle a Chat/queryChanges method call (draft-atwood-jmap-chat-00 §Chat).
args is the RFC 8620 §5.6 /queryChanges request shape (accountId,
optional filter, optional sort, sinceQueryState, optional
maxChanges, optional upToId, optional calculateTotal); the
returned Value is the §5.6 /queryChanges response shape
(accountId, oldQueryState, newQueryState, optional total,
removed, added).
using is the request’s capability list (pass
jmap_server::CallContext::using); without
urn:ietf:params:jmap:metadata a draft-ietf-jmap-metadata-05 §3.6
filter condition is unsupportedFilter (-05 §3).
Returns (response_args, extra_invocations). The extra list is always empty.
§Errors
Returns a method-level JmapError:
invalidArgumentswhenaccountIdis missing or not a valid Id,sinceQueryStateis missing, orfilter,sort,maxChangesorupToIdis malformed;accountNotFoundwhen the backend does not knowaccountId;unsupportedFilterwhen the filter does not decode as a Chat filter, or holds a draft-ietf-jmap-metadata-05 §3.6 condition withouturn:ietf:params:jmap:metadatainusing;unsupportedSortwhensortnames a property this server does not define;cannotCalculateChangeswhen the backend cannot compute the changes sincesinceQueryState;serverFailwhen the backend fails, or any other RFC 8620 §5.6 error the backend returns.