Skip to main content

Module push

Module push 

Source
Expand description

chatPush support for RFC 8620 push subscriptions (draft-atwood-jmap-chat-push-00).

The chatPush property lives in PushSubscription::extra as a map of accountId to ChatPushConfig. A backend calls validate_chat_push on every create and update, strip_unsupported_chat_push on every subscription it returns from list_push_subscriptions, builds notifications with chat_state_change_for, and builds the ChatMessagePush for each new inbound message with build_chat_message_push after should_push allows it.

Structs§

BuiltPush
A built ChatMessagePush and the Web Push urgency to deliver it with.
OwnerFlags
The account owner’s standing in the Chat at delivery time, which decides the broadcast scopes that target them.
PushItem
The stored records one ChatMessageEntry is built from.

Functions§

build_chat_message_push
Build the ChatMessagePush for one new inbound message under one subscription’s ChatPushConfig for account_id.
chat_state_change_for
The StateChange to push to sub for the types in changed, or None when nothing is left to send.
should_push
Whether a ChatMessagePush for the new inbound message msg goes to a subscription whose chatPush entry for account_id is cfg.
strip_unsupported_chat_push
Remove chatPush entries for accounts not in caps from a stored subscription’s extra map before it is returned.
validate_chat_push
Check the chatPush property in a PushSubscription’s extra map before it is stored.