pub struct UiNotifyMessage {
pub plugin: String,
pub source: String,
pub title: String,
pub text: String,
pub key: Option<String>,
pub delay_ms: Option<u64>,
pub at: Option<u64>,
pub until_back: Option<bool>,
pub rewritten: bool,
pub uuid: String,
pub session_id: String,
}Expand description
system/ui_notify — one $.ui.notify(text) from a plugin in a headless
session: a notification for the client to raise under the plugin’s name,
now or later. Nothing limits how often a plugin sends one
(CLI 2.1.321+).
Fields§
§plugin: StringThe calling plugin’s registry name, as the hooks engine knows it
(never plugin-settable). Not cleaned as title is, so scrub it, and
show it after the host’s own word that a mod sent it, so neither it
nor the title can pass for the app’s own.
source: StringThe plugin’s full id, name@marketplace (name@inline when
side-loaded), as the hooks engine loaded it (never plugin-settable).
Two plugins sharing a name differ here.
title: StringThe notification’s heading: the plugin’s words, cleaned of control characters and cut to 120 characters, or the plugin’s name. Plain text, and never the only sign of who sent it.
text: StringThe body: the plugin’s words, cleaned of control characters and cut to 1000 characters. Plain text: draw it as a text node, never as markup.
key: Option<String>The plugin’s name for this notification: one with the same source
and key replaces the last. Scope it by source, so one mod cannot
touch another’s. Absent: each frame is its own notification.
delay_ms: Option<u64>How long after this frame arrives to raise it; the client holds it,
so it fires with the session out of reach. At most 7 days. Absent
(with no at): raise it now.
at: Option<u64>The epoch-millisecond time to raise it, at most 7 days ahead. Never
sent beside delay_ms.
until_back: Option<bool>With delay_ms or at: throw it away if the person returns to the
session before it fires.
rewritten: boolTrue when what this frame carries differs from what the sender sent and another plugin’s hook was in the chain: its words, timing or key may not be the sender’s, so say so beside the sender. Always sent; missing (from an older engine) reads as false. Never plugin-settable.
uuid: String§session_id: String