Event Model#
Waton exposes two inbound streams at low level:
client.on_message(node)for raw protocol nodes.client.on_event(event_dict)for normalized events.
If you need stable event categories for app logic, prefer on_event.
Normalized event categories#
The normalizer classifies incoming node tags and emits event dictionaries.
Common event type values include:
Message and content:
messages.upsertmessages.reactionmessages.reaction_encryptedmessages.poll_update_encryptedmessages.event_response_encrypted
Protocol-derived message events:
messages.revokemessages.editmessages.ephemeral_settingmessages.history_syncmessages.app_state_sync_key_sharemessages.group_member_label_changemessages.protocol(fallback)
Receipts and retry:
messages.receiptmessages.retry_requestmessages.retry_request_sent
Notifications, calls, and ack lane:
messages.notificationmessages.callmessages.ackmessages.bad_ackmessages.protocol_notification
Payload shape (high-level)#
Event payloads are dictionaries and vary by type. Typical keys:
message events:
{"type": ..., "message": {...}}receipt events:
{"type": ..., "receipt": {...}}notification events:
{"type": ..., "notification": {...}}ack events:
{"type": ..., "ack"|"bad_ack": {...}}call events:
{"type": "messages.call", "call": {...}}
Ordering and buffering#
Waton can prioritize incoming lanes when buffering is enabled:
receipt
notification
call
ack
ib
message
other
This behavior is controlled by:
enable_offline_node_bufferincoming_node_buffer_sizeincoming_node_yield_every
Tip: if your business logic depends on strict ordering, document and test with this buffering behavior in mind.
High-level App note#
App only routes message nodes to handler decorators.
For full normalized event coverage, attach listeners directly to WAClient.
Next steps#
Message content and parsing details: Message Model
App message handlers and filters: Handling Messages