Expand description
Message/* method handlers (draft-atwood-jmap-chat-00 §Message).
§Wire-shape contract
Every handle_* function in this module conforms to the canonical JMAP
method shape. The args: serde_json::Value parameter MUST be a JSON
Object whose fields match the corresponding RFC 8620 §5 method shape
(/get → §5.1, /changes → §5.2, /set → §5.3,
/query → §5.5, /queryChanges → §5.6), with the type-specific
arguments defined by draft-atwood-jmap-chat-00 §Message. The
returned Value is the corresponding method-response object per the
same section refs.
The returned HandlerOutput::extra_invocations carries any invocations
that this handler injected into the request stream (RFC 8620 §6.3);
for the handlers in this module the vector is always empty.
Each handler returns Err(JmapError) for method-level failures (RFC 8620
§3.6.2 and §5):
- every handler:
accountNotFound,invalidArguments,serverFail; /get,/set:requestTooLargepastmaxObjectsInGet/maxObjectsInSet;/set:stateMismatch;/changes,/queryChanges:cannotCalculateChanges;/queryChanges:tooManyChanges;/query,/queryChanges:unsupportedFilter;/query:unsupportedSort,anchorNotFound.
Per-target failures inside /set (including the slow_mode_check
rateLimit and reaction-patch invalidPatch paths) surface in the
notCreated / notUpdated / notDestroyed maps within Ok((Value, ...)),
not as Err.
Enums§
- Store
Outcome - The result of
store_server_message.
Constants§
- ENCRYPTED_
BODY_ TYPES - Default
bodyTypevalues that indicate an end-to-end encrypted body: the one type draft-atwood-jmap-chat-00 §Messagebodynames. A backend adds others, such as"application/mimi-fanout"(draft-atwood-jmap-chat-mimi-00 §MLS Messages), throughChatLimits::encrypted_body_types. - SUPPORTED_
BODY_ TYPES - Default
bodyTypevalues this server accepts, advertised as thesupportedBodyTypescapability (draft-atwood-jmap-chat-00 §Account-Level Capability Object). A backend lists other types throughChatLimits::supported_body_types.
Functions§
- find_
message_ by_ sender_ msg_ id - Find the Message in
chat_idwhosesenderMsgIdissender_msg_id. - handle_
message_ changes - Handle a
Message/changesmethod call (draft-atwood-jmap-chat-00 §Message). - handle_
message_ get - Handle a
Message/getmethod call (draft-atwood-jmap-chat-00 §Message). - handle_
message_ query - Handle a
Message/querymethod call (draft-atwood-jmap-chat-00 §Message). - handle_
message_ query_ changes - Handle a
Message/queryChangesmethod call (draft-atwood-jmap-chat-00 §Message). - handle_
message_ set - Handle a
Message/setmethod call (draft-atwood-jmap-chat-00 §Message). - store_
server_ message - Store a Message that the server, not a client, creates: for example a
MIMI fanout Message (draft-atwood-jmap-chat-mimi-00
§application/mimi-fanout) or a federation
Peer/deliverMessage.