Skip to main content
Examples on this page target source snapshot 35a69a14, not a crates.io release. Use the current API guide to select the matching dependency.

Post content

Status sends require an explicit recipient list. audience() returns the last synchronized privacy snapshot, not a computed recipient list; None does not mean all contacts are allowed.
Use send_raw on the status facade for prepared protobuf media. The font argument is the generated FontType, not an arbitrary integer. Background colors use ARGB (0xAARRGGBB).

StatusSendOptions

Start with Default and use builders for privacy, content ID, operation ID, extra nodes and device freshness. The type is non-exhaustive.
  • with_message_id(MessageId) overrides the ID of a new content post.
  • with_stanza_id(StanzaId) overrides an operation such as a revoke or raw reaction.
  • Passing a content override to an operation, an operation override to a post, or both overrides is rejected.

Revoke content

The target remains a MessageId; the revoke has its own fresh StanzaId.
Pass the same recipient list used by the original post so the revoke reaches that audience. A revoke operation ID must differ from its target content ID. Do not convert a target ID into the operation domain merely to reuse the same string.

React to received status

Use client.send_reaction(&inbound.message_ref()?, emoji) so the source owner and status metadata are retained. client.send_reaction_raw is the explicit raw interoperability path; consult its source for the exact owner/key arguments.

Source reference

Status options, audience and operations · Typed status reactions